.net - How can i post data using Jquery in Asp.net in some correct way? -
i using jquery posting form data in aspx.
the way have adopted is, make 1 page having form , aspx page receive values , in page_load run query or other logic.
i using $.ajax method of jquery, if there exception or issue occurs, not respond correctly , preloader kept on working.
please tell me if there supportive way in .net, can use jquery $.ajax in proper way, or should use webservices or whatever please let me know, or can call code behind c# function jquery $.ajax? atif
//the data want post var dataobject = json.stringify(reqobject); /// use need json plugin link posted below //call page method $.ajax({ async: false, type: "post", url: youraspxpage + "/" + code behind function name, contenttype: "application/json;", data: dataobject, datatype: "json", success: ajaxcallsuccess, error: ajaxcallfailure }); function ajaxcallsuccess(response) { var msg1 = response.d; } function ajaxcallfailure(response) { var msg2 = response.d; }
try let me know if works...
Comments
Post a Comment