Skip to Main Content
ASP.NET 4 24-Hour Trainer
book

ASP.NET 4 24-Hour Trainer

by Toi B. Wright
July 2010
Beginner content levelBeginner
552 pages
10h 14m
English
Wrox
Content preview from ASP.NET 4 24-Hour Trainer

Chapter 24B. Using the Ajax Helpers in MVC

When a typical ASP.NET page needs to be refreshed from the server, it triggers a complete page refresh. The result is a slight delay and a flicker of the page. Wouldn't it be great if your page had to ability to submit only the section that needed to be updated, and it subsequently only needed to refresh that section? The Ajax helpers in the ASP.NET MVC framework give your web pages the ability to perform partial page updates. In this lesson I teach you how to use the Ajax helpers.

Ajax stands for Asynchronous JavaScript and XML. It enables your client-side web pages to exchange information with the server by using asynchronous calls. To do this, it uses both JavaScript and XML and can require a great deal of code. Because of the complexity involved in programming, a number of popular Ajax libraries have been developed. In fact, Microsoft includes an Ajax library as part of the ASP.NET 4 framework.

Whenever you create a new MVC project using an MVC template, the Scripts folder is automatically populated with both jQuery and Ajax scripts as shown in Figure 24B-1.

FIGURE 24B-1

Figure 24B.1. FIGURE 24B-1

Before you can use the Ajax helpers you must include the following libraries in your page:

  • MicrosoftAjax.js

  • MicrosoftMvcAjax.js

The Scripts folder includes two versions of each of these libraries. The debug versions should be used during development because they ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 4 24-Hour Trainer

ASP.NET 4 24-Hour Trainer

Toi B. Wright
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9780470596913Purchase bookExamplesErrata