i

ASP.Net A Complete Guide

UpdatePanel

It is another control that is provided by the Ajax. It will help in the scenario where the partial rendering is required on the page area.

Syntax

 

 

The UpdatePanel tag have two childtags one is the ContentTemplate and second is the Triggers tags.

ContentTemplate: It holds the content of the panel. The control can be anything that you add on the web page.

Triggers: It holds the trigger, which will update the panel content.

Example:

                               

 

When we set UpdateMode property is set to Always, then the UpdatePanel control’s content will get updated on every postback request.

If we set the ChildrenAsTriggers property to false & the UpdateMode property to Always, an exception will get thrown.