-1

我有一个通过 Javascript 函数调用单个 PageMethod 的测试 Web 应用程序。

PageMethods.myMethod(params, onSuccess, onFailed);

当我使用 urlRewriting 它不再工作了。所以,我搜索了网页,发现这个要添加到 js 文件中。

Pagemethods.set_path("/the_real_path.aspx");

但是,这不起作用。当我使用 F12 查看 chrome 中的 Web 开发人员工具时,它给出了 404 not found 错误。

你有什么建议可以给吗?任何帮助将不胜感激

下面就做好了。

-ScriptManager EnablePageMethods = True
-Method is public and shared(static)
-Method is decorated with <WebMethod(True)>
4

1 回答 1

-3

无论如何,我找到了另一种调用WebMethod. 我使用了网络服务。我不需要使用 PageMethods。

于 2012-12-06T15:40:26.917 回答