Calling Web Services from the Client

The heart of Ajax is the capability to send and retrieve information from the web server without needing to post back a page to the web server. Ajax is all about performing “sneaky” postbacks.

The vision behind a pure Ajax application is that it should consist of a single page. All updates to the single page after it has been loaded should be performed by calling web services. You should never need to perform a postback because any postback results in a bad user experience. (The page jumps and the universe freezes.)

The jQuery library provides support for calling web services directly from the client (the web browser) with a built-in function called $.ajax. In this section, you learn two methods of exposing ...

Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.