I want to achieve create (INSERT) screen using $.POST or $.AJAX.
Note: code is working fine without AJAX call..it is already there.. now i need to do ajax call and s
You have forgot to add id selecter:
$.ajax(
{
url: '@Url.Action("CreateProduct","ProductManagement")',
dataType: 'json',
contentType: 'application/json; charset=utf-8',
type: 'post',
data: $('#frm').serialize(), // $('#frm');
success: function () { alert('s'); },
error: function (e1, e2, e3) { alert(e2); alert(e1 + ' ' + e2 + ' ' + e3); alert('failure event'); }
}
);