Published: 17 Aug 2007
By: Kazi Manzur Rashid

Kazi reviews the book written by two ASP.NET Ajax members.

Written by: Matt Gibbs and Bertrand Le Roy
Pages: 60
Publisher: O'Reilly Media
ISBN: 0596527470





This book is co-written by two ASP.NET AJAX Team Members and published in O'Reilly shortcut series. Its length is quite short and focuses only one subject: The ASP.NET AJAX UpdatePanel control. It is organized in eight different sections. Let me share my findings with you.

Introducing the UpdatePanel Control

This section starts with the evolving history of Update Panel. It follows a tutorial on how to setup and run an ASP.NET AJAX Project in Visual Studio with minimum configuration settings. Then it moves on discussing some important properties of the UpdatePanel like ContentTemplate, UpdateMode, AsyncPostBackTrigger, PostbackTrigger, RenderMode and few other important topics like ScriptManager dependency, working with the UpdateProgress and Timer controls, aborting an asynchronous postback and registering a control for performing an asynchronous postback. This is a must read section if you are new to the ASP.NET AJAX UpdatePanel control.

Using the UpdatePanel Control

This section contains three examples of increasing complexity, in which the UpdatePanel is used to Ajax-ify the pages. A good starting point if you want to convert your old ASP.NET 2.0 pages to Ajax. The section starts with a very simple Wizard Control wrapped by an UpdatePanel. The next example shows a multi-level Master-Detail demo using the AdventureWorks Database. The demo includes a DropDownList, GridView and FormView controls. It shows how an UpdatePanel can be updated based upon events raised by other controls. The third and final example shows how to create a search page with a popup that displays a “details” preview of the AdventureWorks databases's Product Table. It also shows how to utilize JavaScript with server side controls in order to position an HTML element, which is then shown as a popup.

Repeating UpdatePanels

This section is a continuation of the previous section. It shows how an UpdatePanel can be placed in the ItemTemplate of a DataList or Repeater controls, instead of putting these controls in an UpdatePanel. This is certainly a good choice when we need to update only the data related to a specific item instead of the whole control.

Redirecting from an asynchronous postback

In early days of ASP.NET AJAX, invoking Response.Redirect() during a partial postback throwed an exception. This is not the case in the current release of ASP.NET AJAX. This section describes how the redirect happens in partial rendering mode.

Displaying Error Messages

This section shows how to handle errors during asynchronous postbacks by utilizing the AsyncPostBackErrorMessage property and AsyncPostBackError event of the ScriptManager control.

Client-side representation of UpdatePanel controls and ScriptManager

Although the index does not show this as a section, I think it deserves a separate one. Here, the client side PageRequestManager object is discussed. It is actually responsible for managing the partial update of a page. This section provides the description of the events that are fired during a partial update and explains how to hook these events in order to change the default behavior of the UpdatePanel. A must read if you want to learn what happens under the hoods of the UpdatePanel.

Dealing with Caveats

This section is also equally important in order to understand the details of the UpdatePanel. This section discusses writing custom controls that leverage the UpdatePanel. It focuses on how to register client side scripts when writing custom controls. Then it moves to discussing how nested UpdatePanels should be used. The next topic explains that UpdatePanel requests are sequential; and why it is not possible to allow more than one simultaneous asynchronous postback. This section ends with a discussion on why the xml-script declarative language is not supported in the UpdatePanel; and how to use the File Upload control in the UpdatePanel control.

For Further Reading

This section contains a few useful links on ASP.NET AJAX. I would also recommend checking the following ones:

Appendix: Creating the AdventureProducts.xsd DataSet

Contains instructions and details on setting up the sample code. You can also download the sample code for free.


This book contains a lot of valuable information on the UpdatePanel especially when it's length and price is taken into account. It lacks providing information on a few important topics like common issues that break the UpdatePanel. It should provide a few more real life examples such as loading controls dynamically, using validators in the UpdatePanel as well as scalability issues of the UpdatePanel. Still I would recommend reading it if you are new to the ASP.NET AJAX UpdatePanel control. I rate it 3.5 out of 5. The book is available for purchase in PDF format from O'Reilly.

<<  Previous Article Continue reading and see our next or previous articles Next Article >>

About Kazi Manzur Rashid

Kazi Manzur Rashid, Nickname Amit is a Diehard fan of Microsoft Technology. He started programming with Visual Basic 5.0 back in 1996. Since then he has developed many diversified solutions in his professional career, which spans from Anti-Spyware Tool to Personalized Start Page. Currently He is wor...

This author has published 10 articles on DotNetSlackers. View other articles or the complete profile here.

Other articles in this category

Animating a Web Form using ASP.NET AJAX
In this article you will learn how to animate a webform using ajax.
Jquery Ajax
JQuery makes communicating with the server very, very easy. JQuery uses get(), getJSON(), and post(...
jQuery Deferred Objects Promise Callbacks
jQuery Deferred/Promise objects untangle spaghetti-like asynchronous code.
jQuery in Action 2nd edition: Queuing functions for execution
This article is taken from the book jQuery in Action, second edition. This segment shows how you can...
This is my custom article

You might also be interested in the following related blog posts

November's Toolbox Column Now Online read more
September's Toolbox Column Now Online read more
Building Interactive User Interfaces with Microsoft ASP.NET AJAX: Triggering Full Page Postbacks From An UpdatePanel read more
Mixing Silverlight and MS ASP.NET AJAX 3.5 in the same web application. read more
August's Toolbox Column Now Online read more
Sneak Peek at our book Beginning ASP.NET MVC 1.0 read more
ASP.NET Ajax in Action, 2nd edition read more
Going Controller-less in MVC: The Way Fowler Meant It To Be read more
XAML By FARR: Resource Dictionaries Vs User Control Resources read more
CodeDigest.Com Article,Codes,FAQs - April,2009 read more

Please login to rate or to leave a comment.