ASP.NET jQuery error: Unknown Web Method

后端 未结 3 1171
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-20 10:56

This is my first time attempting to call an ASP.NET page method from jQuery. I am getting a status 500 error with the responseText message that the web method cannot be foun

3条回答
  •  醉梦人生
    2020-12-20 11:37

    Add public static before your method...

    ex.

    [WebMethod]
    public static string MethodName() {}  
    

提交回复
热议问题