.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...

json plugin

see this


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -