4.5. Improving Performance with the AJAX Update Panel

Nobody likes to wait for a Web page to refresh. In this section, you tackle the evils of postbacks to improve performance. With ASP.NET AJAX, it takes only a couple of minutes to improve the feel of your page. Follow these steps to implement AJAX enhancements:

  1. From the Toolbox, in the AJAX Extensions category, drag a ScriptManager control and drop it before any other controls at the top of the page.

  2. From the Toolbox, drag an UpdatePanel control and drop it below the ScriptManager control.

  3. Drag the GridView control and drop it inside the UpdatePanel control.

  4. Drag the FormView control and drop it inside the UpdatePanel control.

  5. Test the page to confirm that there's no longer a full page-refresh when adding or editing an item.

At runtime, click the links and notice how smooth the page feels. For more ways to use AJAX, see Chapter 15.

Get ASP.NET 3.5 For Dummies® 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.