Need help with updatePanel
<p><strong>My content page</strong></p>

<pre><code>  &lt;asp:updatePanel id="Panel1" runat="server" Visible="true"&gt;
         &lt;ContentTemplate&gt;
                &lt;div&gt;
                    blah blah
                &lt;/div&gt;
          &lt;/ContentTemplate&gt;
    &lt;/asp:updatePanel&gt;

    &lt;asp:updatePanel id="Panel2" runat="server" Visible="false"&gt;
         &lt;ContentTemplate&gt;
                &lt;div&gt;
                    yada yada
                &lt;/div&gt;
          &lt;/ContentTemplate&gt;
    &lt;/asp:updatePanel&gt;     
</code></pre>

<p><strong>Code file</strong> ..The following code is at the end of Submit button click event :-</p>

<pre><code>            Panel1.Visible = false;
            Panel2.Visible = true;
</code></pre>

<p>Now earlier I was using asp:Panel..then it was working fine..like Panel 1 would hide and Panel 2 would show up instead..it was AFTER I changed asp:Panel to asp:updatePanel that things got screwed up...now the Submit button just won't work !!</p>

<p>What's gone wrong suddenly ?? I changed it to updatePanel so the page doesn't refresh..isn't this how we implement this thing ???</p>

<pre><code>       &lt;asp:updatePanel id="Panel1" runat="server"&gt;
          &lt;ContentTemplate&gt;
          &lt;div&gt;
     &lt;p&gt;
        Type ur name

                &lt;asp:TextBox ID="name" runat="server"&gt;
                &lt;/asp:TextBox&gt;
       &lt;/p&gt;


        &lt;asp:Button ID="btn" OnClick="btn_Click" runat="server" 
        Text="Submit" /&gt;
     &lt;/div&gt;

    &lt;/ContentTemplate&gt;
            &lt;/asp:updatePanel&gt;


   &lt;asp:updatePanel id="Panel2" runat="server" Visible="false"&gt;
    &lt;ContentTemplate&gt;
    &lt;div&gt;
       Thank You!

    &lt;/div&gt;
    &lt;/ContentTemplate&gt;
    &lt;/asp:updatePanel&gt;
</code></pre>
