Chapter 6. Enhancing Your Site with AJAX

The concept of a web application has changed greatly over the last 20 years. HTML was originally designed as a way to expose text-based content and easily link to other text-based pages via the Internet. After a little while, however, users and content producers alike wanted more from their web pages, so many websites began using JavaScript and Dynamic HTML techniques in order to make their static HTML content more interactive. Asynchronous JavaScript and XML—or, as it’s more commonly known, AJAX—is a catchall term that refers to making asynchronous requests to the web server, avoiding the need to navigate to a new page in order to get fresh data.

Rather than transmitting and redrawing the entire page, AJAX techniques request content asynchronously and then use that content to update various sections of the page. AJAX techniques typically request one of two types of content: server-generated HTML markup that the browser injects directly into the page, and raw serialized data that client-side JavaScript logic uses to create new HTML or to update existing markup in the browser.

In this chapter, we will take a look at how to take advantage of the powerful features in ASP.NET MVC that help you incorporate AJAX techniques into your web applications.

Partial Rendering

The concept of making an HTTP request to a server and receiving HTML markup in response is the foundation of the World Wide Web. Therefore, making yet another request for more server-generated ...

Get Programming ASP.NET MVC 4 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.