Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From Reference to MSDN If the UpdateMode property is set to Conditional, the UpdatePanel control’s content is updated when one of the following is true:</p> <ol> <li>When the postback is caused by a trigger for that UpdatePanel<br> control.</li> <li>When you explicitly call the UpdatePanel control's Update method.</li> <li>When the UpdatePanel control is nested inside another UpdatePanel control and the parent panel is updated.</li> <li>When the ChildrenAsTriggers property is set to true and any child control of the UpdatePanel control causes a postback. Child controls of nested UpdatePanel controls do not cause an update to the outer UpdatePanel control unless they are explicitly defined as triggers for the parent panel.</li> </ol> <p>So Set ChildrenAsTigger to false set asynchrnous trigger for your first update panel like below.</p> <pre><code>&lt;asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" ChildrenAsTriggers="false" runat="server"&gt; &lt;ContentTemplate&gt; &lt;fieldset style="width:30%"&gt; &lt;legend&gt;Panel - 1 &lt;/legend&gt; &lt;asp:Label ID="label1" runat="server"&gt;&lt;/asp:Label&gt; &lt;asp:Button ID="b1" runat="server" OnClick="both" Text="Update Both Pannels" /&gt; &lt;asp:Button ID="b2" runat="server" OnClick="one" Text="Update Single Pannel" /&gt; &lt;/fieldset&gt; &lt;/ContentTemplate&gt; &lt;Triggers&gt; &lt;asp:AsyncPostBackTrigger ControlID="b1" EventName="Click" /&gt; &lt;/Triggers&gt; &lt;/asp:UpdatePanel&gt; &lt;asp:UpdatePanel ID="UpdatePanel2" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;fieldset style="width:30%"&gt; &lt;legend&gt;Panel - 2 &lt;/legend&gt; &lt;asp:Label ID="label2" runat="server"&gt;&lt;/asp:Label&gt; &lt;/fieldset&gt; &lt;/ContentTemplate&gt; &lt;Triggers&gt; &lt;asp:AsyncPostBackTrigger ControlID="b2" EventName="Click" /&gt; &lt;/Triggers&gt; &lt;/asp:UpdatePanel&gt; </code></pre> <p>After that on click of B1 BUTTON update the sceond update panel explicitly...like below</p> <pre><code>protected void both(object sender, EventArgs e) {     label1.Text = DateTime.Now.ToLongTimeString();     label2.Text = DateTime.Now.ToLongTimeString(); UpdatePanel2.Update(); } protected void one(object sender, EventArgs e) {     label1.Text = DateTime.Now.ToLongTimeString();     label2.Text = DateTime.Now.ToLongTimeString(); UpdatePanel2.Update(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload