开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜