Summary


The UpdatePanel is a simple and flexible control for adding partial page updates to an ASP.NET application. You can take an existing application and identify parts of a page that can be updated independently, bypassing the click-pause-flash pattern that annoys users in web applications. The ViewState and other hidden fields are updated automatically as part of the ScriptManager’s coordination of UpdatePanels on the page.

The default behavior is to have every action that would have triggered a postback from a child control of the UpdatePanel cause a partial page update. The children controls are treated as triggers; thus, the ChildrenAsTriggers property is true by default. You can also configure Triggers to be events on controls elsewhere on the page.

ASP.NET AJAX is an extension to ASP.NET 2.0. Some limitations will require updates to the underlying framework in order for controls that already exist to work with the UpdatePanel. The controls need to migrate from using the ClientScriptManager to the new ScriptManager included as part of ASP.NET AJAX. Some of the built-in controls, like the Validators, have been updated already. Other controls, like the Substitution and WebParts controls, will require more extensive changes in a future release of the .NET Framework before they are compatible.

The PageRequestManager provides a whole lifecycle of events in the browser that allows you to control how asynchronous requests occur. You can cancel requests before they start, abort them while they are in flight, and react to any errors that happen while they are being processed.

The UpdateProgress control makes it easy to let the end user know that an asynchronous request is being processed. Without it, a long-running request can leave the user feeling that his actions are being ignored. You can have an UpdateProgress control associated with each UpdatePanel or a single UpdateProgress associated with multiple UpdatePanels.

You can easily update parts of the page out-of-band based on the user clicking a button, and you can also update parts of the page automatically. The Timer control makes it simple to define an interval to have parts of the page refreshed without user intervention.

As soon as you start initiating asynchronous requests, the need may arise to cancel requests before they start, or abort them before they complete. The PageRequestManager provides events that give you fine-grained control over the asynchronous requests. And when errors occur during the page request, you can detect them and react accordingly.

The UpdatePanel and PageRequestManager work together with the help of the ScriptManager to provide a platform for developing a more responsive and intuitive user experience. The extensibility points make it easy to integrate partial page rendering into existing complex applications.




Professional ASP. NET 2.0 AJAX
Professional ASP.NET 2.0 AJAX (Programmer to Programmer)
ISBN: 0470109629
EAN: 2147483647
Year: 2004
Pages: 107

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net