3
function Show() {
var data = $('#CNform').serialize();
console.log(data);
$.ajax({
type: 'POST',
cache: false,
url: '/CN/Show',
data: data,
success: function (data, textStatus, jqXHR) {
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
}
And change the type of parameter
//Controller
[HttpPost]
[AcceptVerbs(HttpVerbs.Post)]
public string Show(CNModel modelParameter)
{
// Code
}
Accepted 1
Thanx a lot Gaurav.
Issue has been resolved .
Also one thing i have modified in the cshtml file is:
- @using (Html.BeginForm(null, null, new { @id = string.Empty }, FormMethod.Post,
- new { @id = "CNform" })