WebMethod (sometimes) returns entire website

会有一股神秘感。 提交于 2019-12-06 05:07:19

Here's a discussion about your same issue that might shed some light on the situation. Basically, what it says is that it's not working because the handler that deals with PageMethods is looking for {pagename.aspx}/{methodname}, and your url rewriting is causing it to not recognize you are calling a page method.

One suggestion on that page was to add the following in your javascript code somewhere after the auto-generated call of the same signature:

PageMethods.set_path('/items.aspx');

This will make it call your page method using the real url instead of the rewritten one.

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