Click here to Skip to main content
15,166,358 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
what is update panel childrenastriggers property and for what it is used plz explain it with an example plzzzz...thanku
Posted
Updated 4-Dec-12 3:00am
v4

Children as [^]

The ChildrenAsTriggers property determines whether postbacks from a child ontrol in an UpdatePanel result in its contents being refreshed. By default, this property is set to True and can be set to False only when the UpdateMode is set to conditional. Attempting to do so without this condition results in an InvalidOperationException being thrown by the ScriptManager during the page’s PreRender event.

Setting the property to False allows asynchronous postbacks to occur, but the ScriptManager bypasses any updates to the UpdatePanel that are associated with the postback.

Above was taken from ASP.NET AJAX in Action book. I thought it would better than my own words

So if you set this property to False, then any button or link button or any control that cause postback inside the panel will cause the page to post back normally (reload entire page)

the bellow is taken from the documentation:

A scenario where you might set ChildrenAsTriggers to false is when you have two UpdatePanel controls and you want a postback from the first panel to update the content of the second panel but not update its own content. For example, the first panel might be a list of products to buy and the second panel might be a shopping cart.
   
v2
when set to true update panel receives postback only from controls kept inside it. otherwise, it will be postedback always. this is useful when you have put multiple updatepanel controls on same page.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900