jQuery and asp.net webservice not working
Im开发者_开发技巧 trying to call a asp.net webservice from jQuery but I get the telling me that i need to set the System.Web.Script.Services.ScriptService(). The only problem is that i have set this in the webservice and it still complains?
The jQuery uses POST and application/json and iv inlcuded HttpPost and get in my web.config. What can the problem be???
Thx for any help!
Decorate your method with the scriptmethod attribute:
(vb.net)
<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False, XmlSerializeString:=True)> _
Public Function SomeMethod() As String
End Function
精彩评论