开发者

calling serverside method from javascript

开发者 https://www.devze.com 2023-03-05 14:45 出处:网络
I want to call server side C# function from java开发者_Python百科script. I used the way given in this article.

I want to call server side C# function from java开发者_Python百科script.

I used the way given in this article.

This works fine when I did the same steps in a new ASP.NET application.

But when I repeat the same steps in the application on which i am working it give the error:

"PageMethods is Undefined".

I am working on .Net 4.0.


Have you enabled page methods on your scriptmanager?

<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />


Make sure you have a ScriptManager control?

As an alternative to trying to get the PageMethods approach to work, I would recommend switching to the more up to date WCF Script Services:

  • Exposing WCF Services to Client Script
  • Forget Page Methods move on to Script Services
0

精彩评论

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