O'Reilly logo

Programming Microsoft® ASP.NET 3.5 by Dino Esposito

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Remote Calls via Page Methods

As we've seen, Web and WCF services are simple and effective ways of implementing a server API. When the ASP.NET AJAX runtime engine has generated the proxy class, you're pretty much done and can start calling methods as if they were local to the client. Web and WCF services, though, are not free of issues. They require an extra layer of code and additional files or assembly references to be added to the project. Is this a big source of concern for you? If so, consider that you have an alternative—page methods.

Introducing Page Methods

Page methods are simply public, static methods exposed by the code-behind class of a given page and decorated with the WebMethod attribute. The runtime engine for page methods and AJAX-enabled ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required