Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.

 

 

 

 

 

 

 

ChildrenAsTriggers Property

Gets or sets a value that indicates whether postbacks from immediate child controls of an UpdatePanel control update the panel's content.

Syntax

CSharp

[CategoryAttribute("Behavior")]
[DefaultValueAttribute(true)]
public bool ChildrenAsTriggers { get; set; }

VisualBasic

<CategoryAttribute("Behavior")> _
<DefaultValueAttribute(True)> _
Public Property ChildrenAsTriggers As Boolean

ManagedCPlusPlus

[CategoryAttribute(L"Behavior")]
[DefaultValueAttribute(true)]
public:
bool ChildrenAsTriggers {
	bool get ();
	void set (bool value);
}

JSharp

/** @property */
/** @property */

Value

Return Value

true if postbacks from immediate child controls of the UpdatePanel control update the panel's content; otherwise, false. The default is true.

Remarks

Set the ChildrenAsTriggers property to true if you want postbacks from immediate child controls of the UpdatePanel control to cause an update of the panel's content. Child controls of nested UpdatePanel controls will not cause an update of the parent UpdatePanel control's content unless you call the Update() method explicitly or you define the child controls as triggers.

note

When the UpdateMode property is set to Always and the ChildrenAsTriggers property is set to false, an InvalidOperationException exception is thrown during the OnPreRender(EventArgs) method. This combination of properties is not allowed for the UpdatePanel control.

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.

Assembly: System.Web.Extensions (Module: System.Web.Extensions)