jquery - Why ajax call not hit the action method in MVC? -
[![enter image description here][1]][1]i working on assignment , ajax call not hit action method. debugged , check not reach action method.here code.
$.ajax({ type: "post", cache: false, contenttype: "application/json; charset-utf-8", data: json.stringify(obj), datatype: "json", url: "/admin/workflow/save?id=" + id + "&template=" + template, success: function() { alert("success"); }, error: function(xhr) { alert("data not saved"); }
it show data not saved. worked fine don't know happen.
here actin method
public jsonresult save(int id, int template, list<sequence> data)
problem resolved. fine. issue data not converted correctly in json. checked json, there problem in array (obj) stringfy in json. corrected objtasktemplate.it works fine now
Comments
Post a Comment