UpdatePanel.ChildrenAsTriggers Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether postbacks from immediate child controls of an UpdatePanel control update the panel's content.
public:
property bool ChildrenAsTriggers { bool get(); void set(bool value); };
public bool ChildrenAsTriggers { get; set; }
member this.ChildrenAsTriggers : bool with get, set
Public Property ChildrenAsTriggers As Boolean
Property 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 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.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기