Jquery Ajax Call does not Call the function in .CS file

后端 未结 3 1779
旧巷少年郎
旧巷少年郎 2021-01-26 02:27

Always i get the alert in the \"error\". When i debugged i get the type,url as undefined. can anyone help me why that method is not getting called??

$(document).         


        
3条回答
  •  南方客
    南方客 (楼主)
    2021-01-26 02:47

    If im correct you should be using static method for these purposes, so function in your code behind should look like this

    [WebMethod]
    public static void jQueryAjaxCalledMethod()
    {  
       //SOME CODE HERE       
    }
    

    If you still get some errors take a look on this guy blog Encosia maybe you'll find there a solution

提交回复
热议问题