A.10. Chapter 10

A.10.1.

A.10.1.1.
A.10.1.1.1. Exercise 1 solution

The ScriptManager control is a required component in almost all Ajax-related operations. It takes care of registering client-side JavaScript files, handles interaction with Web Services defined in your web site and it's responsible for the partial page updates. You usually place the ScriptManager directly in a content page if you think you need Ajax capabilities on only a handful of pages. However, you can also place the ScriptManager in a master page so it becomes available throughout the entire site.

When you have the ScriptManager in the master page you can use the ScriptManagerProxy to register individual Web Services on content pages. Since you can only have one ScriptManager in a page, you can't add another one in a content page that uses your master page with the ScriptManager. The ScriptManagerProxy serves as a bridge between the content page and the ScriptManager, giving you great flexibility as to where you register your services.

A.10.1.1.2. Exercise 2 solution

You can let your users know a partial page update is in progress by adding an UpdateProgress control to the page. You connect this control to an UpdatePanel using its AssociatedUpdatePanelID. Inside the <ProgressTemplate> you define whatever markup you see fit to inform your user an update is in progress. A typical <ProgressTemplate> contains an animated icon, some text, or both.

A.10.1.1.3. Exercise 3 solution

To create a script-callable ...

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.