Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Only the content of the update panel will be updated. So you need to remove your update panels from panel1 and panel2 and then place panel1 and panel2 in the same update panel.</p> <p>Edit: From your sample if we expanded the default.aspx to include TestUserControl1 we get something like:</p> <pre><code> &lt;asp:Panel ID="panelUC1" runat="server" Visible="false"&gt; &lt;asp:Panel ID="panelUC1" runat="server"&gt; &lt;div&gt; &lt;asp:Label ID="Label1" runat="server" Text="User Control 1...." /&gt; &lt;/div&gt; &lt;asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;!-- only the content in from here --&gt; &lt;div&gt; &lt;asp:Button ID="buttonNext" runat="server" OnClick="buttonNext_Click" Text="Click" /&gt; &lt;/div&gt; &lt;!-- to here will change when you click on buttonNext --&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; &lt;/asp:Panel&gt; &lt;/asp:Panel&gt; &lt;asp:Panel ID="panelUC2" runat="server" Visible="false"&gt; &lt;tuc2:testUserControl2 ID="testUserControl2" runat="server" /&gt; &lt;/asp:Panel&gt; </code></pre> <p>When you click on buttonNext the page will postback and go throught the full asp.net lifecycle, however the javascript that controls the update panel will only apply the changes made to contenttemplate of the update panel that made the request to the dom already present in the browser. Try resetting the text of buttonNext in the click event and see what I'm trying to say. </p> <p>I found this article <a href="http://msdn.microsoft.com/en-us/library/Bb398780(en-us,VS.90).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/Bb398780(en-us,VS.90).aspx</a> on update panels and usercontrols.</p>
    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. 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.
 

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