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

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -