10.2. Using ASP.NET AJAX in Your Projects

Prior versions of VWD and ASP.NET AJAX required you to modify the web.config file manually to enable Ajax for your ASP.NET application. If you worked with Ajax before in ASP.NET projects, you'll be happy to learn that this is no longer required. Whenever you create a new web site using the File New Web Site dialog box, it's already Ajax-enabled, meaning that you can start using Ajax right away. The Toolbox now contains an additional category with the available Ajax controls that you can use in your pages right from the start.

10.2.1. Creating Flicker-Free Pages

To avoid full postbacks in your ASPX pages and update only part of the page, you can use the UpdatePanel server control. For this control to operate correctly, you also need a ScriptManager control. If you're going to use Ajax functionality in many of your ASPX pages, you can place the ScriptManager in the master page, so it's available in all pages that are based on this master. You'll find these and other Ajax-related server controls in the AJAX Extensions category of the Toolbox, shown in Figure 10-1. Near the end of this chapter you get a closer look at the ScriptManager control, discovering what it does and what it is used for.

Figure 10-1. Figure 10-1

If you don't see the ...

Get Beginning ASP.NET 3.5: In C# and VB 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.