October 2010
Intermediate to advanced
1920 pages
73h 55m
English
If you do not plan to call a web method from multiple pages, don’t perform all the work of creating a separate web service. Instead, you can expose a static method from the same AJAX page calling the web method.
For example, the page in Listing 40.7 includes a server method named GetQuote().
Listing 40.7. ShowPageMethod.aspx


Just like in the previous section, you can call a page method in the exact same manner as a web service. We pass in the URL and method name of our GetQuote() method to the $.ajax call, and our ...