UpdatePanel control

来源:互联网 发布:php cokie怎么保存数据 编辑:程序博客网 时间:2024/04/28 15:21

When an UpdatePanel control is not inside another UpdatePanel control, the panel is updated according to the settings of the UpdateMode and ChildrenAsTriggers properties, together with the collection of triggers. When an UpdatePanel control is inside another UpdatePanel control, the child panel is automatically updated when the parent panel is updated.
The content of an UpdatePanel control is updated in the following circumstances:
If the UpdateMode property is set to Always, the UpdatePanel control’s content is updated on every postback that originates from anywhere on the page. This includes asynchronous postbacks from controls that are inside other UpdatePanel controls and postbacks from controls that are not inside UpdatePanel controls.
If the UpdatePanel control is nested inside another UpdatePanel control and the parent update panel is updated.
If the UpdateMode property is set to Conditional, and one of the following conditions occurs:
You call the Update method of the UpdatePanel control explicitly.
The postback is caused by a control that is defined as a trigger by using the Triggers property of the UpdatePanel control. In this scenario, the control explicitly triggers an update of the panel content. The control can be either inside or outside the UpdatePanel control that defines the trigger.
The ChildrenAsTriggers property is set to true and a child control of the UpdatePanel control causes a postback. A child control of a nested UpdatePanel control does not cause an update to the outer UpdatePanel control unless it is explicitly defined as a trigger.

0 0
原创粉丝点击