Two versions of UpdatePanels in ASP.NET 2.0 form

I have two AJAX UpdatePanels in my ASP.NET 2.0 web form. When I clic the LinkkButton that is on UpdatePanel1, UpdatePanel1 and UpdatePanel2 are updated. How do I update only the first UpdatePanel? Thank.

+2


source to share


2 answers


Please check the UpdateMode property of your update panel.

The content of the UpdatePanel control is updated in the following cases:



  • If the UpdateMode property is set to Always, the content of the UpdatePanel is updated on every postback that is taken 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 embedded within another UpdatePanel control and the parent update panel is updated.
  • When the UpdateMode property is set to Conditional and one of the following conditions is true:
    • You are calling the Update method of the UpdatePanel control explicitly.
    • The rollback is triggered by a control that is defined as a trigger using the Triggers property of the UpdatePanel control. In this case, the control explicitly triggers a refresh of the panel's content. The control can be either inside or outside the UpdatePanel control that defines the trigger.
    • The ChildrenAsTriggers property is set to true and the child control of the UpdatePanel control triggers the postback. A nested UpdatePanel child control does not trigger the external UpdatePanel control to update unless it is explicitly defined as a trigger.
+4


source


You need to set UpdateModes UpdatePodes for Conditional so that they only respond to events from the controls inside them.



+2


source







All Articles