Introduction to UpdatePanel Control of AJAX.NET
UpdatePanel control with the help of ScriptManager control is a very useful control which helps Ajax.Net developers to achieve partial post backs. The only limitation for using this UpdatePanel control is that there has to be one ScriptManager Control placed already on the page which will perform partial post backs. Not only the page should already contain ScriptManager control, but ScriptManager control has to be the first control to be placed on the page before using any of the Ajax.Net controls.
As we already know that AJAX.Net supports asynchronous web application, with the use of UpdatePanel control not only developers get the ease of not writing any client side script but also there is no change while writing server side code. As a developers viewpoint asynchronous post back not only behaves like a regular post back but also performs a complete execution on the server and control life cycle. The benefit of using UpdatePanel control is that limited region of the page that is enclosed in UpdatePanel control marked to be updated are updated. Server responses with the data that was requested by client and on the browsers the client side PageRequestManager class manipulates DOM (Document Object Model) to replace existing HTML with updated information.
Multiple UpdatePanel Controls on a single page
You can have as many UpdatePanel controls on your page as you want and they can also communicate with each other while updating and can help trigger other UpdatePanel controls to send their information asynchronously to the server and get updated in the process.
UpdatePanel Control Usage
When the page that contains one or many UpdatePanel controls is first rendered at client end, all the contents of all the UpdatePanel control are rendered and sent to the client.
UpdatePanel controls can update regions of the page independently depending on the control’s settings and in any particular situation; contents of few or all UpdatePanel controls are updated.
UpdatePanel control like any other server control can be used in
1. In User controls
2. On Master Pages and in Content Pages
3. Nested inside other UpdatePanel controls
4. Inside templated controls such as GridView or Repeater control with minor adjustments in the controls’ properties
UpdatePanel Control Properties
UpdatePanel control is inherited from Control which in turn is inherited from Object class
Properties of UpdatePanel Control