How can I pass model to jquery ajax my code id '@Model' is the model on the view.i need to pass this model to controller which accept argument of type login model.
$('#reject1').click( function() {
var model=@Model;
$.ajax({
cache:true,
type: "POST",
url: "@(Url.Action("Login", "Customer"))",
data:'model='+model,
success: function()
{
//Some logic
},
complete : function() {}
});
return false;
});
Above code doesn't work