Where am I going wrong in calling ASMX web methods from jquery?

两盒软妹~` 提交于 2019-12-04 20:37:55

This was a stupid mistake on my part. The issue has been resolved. While I included the reference to the AJAX Extensions, I forgot to rewrite the httphandler for ASMX services to the ScriptHandlerFactory class.

Adding this resolved the issue.

Since I have got some emails inquiring about examples or how I fixed the issue, I wrote a blog post about how to do this soup to nuts.

http://randomactsofcoding.blogspot.com/2009/03/jquery-json-and-asmx-20-services.html

Yeap. You should abandon ASMX for WCF. Recommendation from Microsoft themselves. I guess it won't help you in your problem, but you would do well to consider WCF or at least start to look at that technology.

I had the same issue but it was fixed when i added the following to the code file

[System.Web.Script.Services.ScriptService]

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!