2 asp panel controls in an update panel
<p>I kept 2 asp panel controls (with text boxes and buttons)  in an update panel so that i want only 1 to be displayed at a time. And when i click on the button, the next asp panel should be visible with old asp panel hidden. I am not able to figure it out.. Here is the code...</p>

<pre><code>&lt;asp:UpdatePanel ID="updatepnlSSN" ChildrenAsTriggers="false" runat="server" UpdateMode="Conditional"&gt;
  &lt;ContentTemplate&gt;
     &lt;asp:Panel ID="pnlSSNLookup" runat="server" BackColor="#EEE6DF" BorderColor="#274F73"
                            BorderStyle="Outset"&gt;
        &lt;table&gt;
           &lt;tr&gt;
            &lt;td colspan="3"&gt;
   &lt;asp:Label ID="lblMsg" runat="server" ForeColor="#713C2C"&gt;&lt;/asp:Label&gt;
            &lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr&gt;
            &lt;td&gt;
   &lt;asp:Label ID="lblStudentID" runat="server" Text="State Student ID:" ForeColor="#274F73" ToolTip="State Student ID Label"&gt;&lt;/asp:Label&gt;
            &lt;/td
            &lt;td&gt;
 &amp;nbsp;&amp;nbsp;&amp;nbsp;
   &lt;asp:TextBox ID="txtStudentID" runat="server" ToolTip="Enter the student's state ID number" AccessKey="i" TabIndex="1"&gt;&lt;/asp:TextBox&gt;
            &lt;/td&gt;
            &lt;td&gt;
   &lt;asp:RegularExpressionValidator ID="valStudentID" runat="server" ControlToValidate="txtStudentID" ErrorMessage="Please enter numeric only" ValidationExpression="[0-9]+" ForeColor="#713C2C" Display="Dynamic"&gt;
&lt;/asp:RegularExpressionValidator&gt;
&lt;asp:RequiredFieldValidator ID="valStdntID" runat="server" ControlToValidate="txtStudentID" Display="Dynamic" ErrorMessage="Please enter a State Student ID" ForeColor="#713C2C"&gt;&lt;/asp:RequiredFieldValidator&gt;
           &lt;/td&gt;
         &lt;/tr&gt;
         &lt;tr&gt;
           &lt;td&gt;
 &lt;asp:Label ID="lblFName" runat="server" Text="Student Legal First Name:" ForeColor="#274F73" ToolTip="First Name Label"&gt;&lt;/asp:Label&gt;
           &lt;td&gt;
           &lt;td&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;
 &lt;asp:TextBox ID="txtFName" runat="server" AccessKey="f" TabIndex="2" ToolTip="Enter the Student's First Name"&gt;&lt;/asp:TextBox&gt;
          &lt;/td&gt;
                                    &lt;td&gt;
   &lt;asp:RequiredFieldValidator ID="valFirstName" runat="server" ControlToValidate="txtFName" Display="Dynamic" ErrorMessage="Please enter the student's first name." ForeColor="#713C2C"&gt;&lt;/asp:RequiredFieldValidator&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;
   &lt;asp:Label ID="lblDOB" runat="server" ForeColor="#274F73" Text="Student Date of Birth &lt;/br&gt; (mm/dd/yyyy)" ToolTip="STudent's date of birth label"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
          &lt;td&gt;
 &lt;div style="position: relative;"&gt;
 &amp;nbsp;&amp;nbsp;&amp;nbsp;
  &lt;asp:TextBox ID="txtDOB" runat="server" AccessKey="d" TabIndex="3" ToolTip="Enter the student's date of birth"&gt;&lt;/asp:TextBox&gt;
  &lt;cc1:CalendarExtender ID="txtDOB_CalendarExtender" runat="server" Enabled="True" TargetControlID="txtDOB" PopupPosition="Right" Format="MM/dd/yyyy"&gt;
    &lt;/cc1:CalendarExtender&gt;
     &lt;/div&gt;
                                    &lt;/td&gt;
                                    &lt;td&gt;
 &lt;asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtDOB" ErrorMessage="Please enter a valid date:  mm/dd/yyyy" ForeColor="#713C2C" MaximumValue="01/01/2075" MinimumValue="01/01/1970" Type="Date" Display="Dynamic"&gt;&lt;/asp:RangeValidator&gt;
  &lt;asp:RequiredFieldValidator ID="valStudentDOB" runat="server" ControlToValidate="txtDOB" Display="Dynamic" ErrorMessage="Please enter the student's date of birth" ForeColor="#713C2C"&gt;&lt;/asp:RequiredFieldValidator&gt;
                                    &lt;/td&gt;
                                &lt;/tr&gt;
                                &lt;tr&gt;
                                    &lt;td&gt;
                                        &amp;nbsp;
                                    &lt;/td&gt;
                                &lt;/tr&gt;
                                &lt;tr&gt;
                                    &lt;td&gt;
 &lt;asp:Button ID="btnSearchSSN" runat="server" Text="Search" AccessKey="s" TabIndex="4" ToolTip="Begin student search" /&gt;
                                    &lt;/td&gt;
                                &lt;/tr&gt;
                            &lt;/table&gt;
                        &lt;/asp:Panel&gt;
                        &lt;/td&gt; &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;
                                &amp;nbsp;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td style="padding: 0 10px 0 10px"&gt;
 &lt;asp:Panel ID="pnlSSNEntry" runat="server" BackColor="#EEE6DF" BorderColor="#274F73" BorderStyle="Outset" Visible="False" Height="110px"&gt;
   &lt;table align="left"&gt;
                                        &lt;tr&gt;
           &lt;td colspan="3"&gt;
   &lt;asp:Label ID="lblSSnText" runat="server" ForeColor="#274F73" Text="Please enter the SSN for:  "&gt;&lt;/asp:Label&gt;
   &lt;asp:Label ID="lblSSNName" runat="server" ForeColor="#274F73"&gt;&lt;/asp:Label&gt;
                                            &lt;/td&gt;
                                        &lt;/tr&gt;
                                        &lt;tr&gt;
                                            &lt;td colspan="3"&gt;
   &lt;asp:Label ID="lblSSNSubmitMsg" runat="server" ForeColor="#713C2C"&gt;&lt;/asp:Label&gt;
                                            &lt;/td&gt;
                                        &lt;/tr&gt;
                                        &lt;tr&gt;
                                            &lt;td&gt;
   &lt;asp:Label ID="lblSSN0" runat="server" ForeColor="#274F73" Text="Social Security Number:   "&gt;&lt;/asp:Label&gt;
                                            &lt;/td&gt;
                                            &lt;td&gt;
  &amp;nbsp;&amp;nbsp;&amp;nbsp;
   &lt;asp:TextBox ID="txtArea" runat="server" AccessKey="a" MaxLength="3" TabIndex="5" ToolTip="Enter the student's SSN area number" Width="29px"&gt;&lt;/asp:TextBox&gt;
 &amp;nbsp;&amp;nbsp;
     &lt;asp:TextBox ID="txtGroup" runat="server" AccessKey="g" MaxLength="2" TabIndex="6" ToolTip="Enter the student's SSN group number" Width="22px"&gt;&lt;/asp:TextBox&gt;
                                                &amp;nbsp;&amp;nbsp;
    &lt;asp:TextBox ID="txtSerial" runat="server" AccessKey="r" MaxLength="4" TabIndex="7" ToolTip="Enter the student's SSN serial number" Width="35px"&gt;&lt;/asp:TextBox&gt;
                                            &lt;/td&gt;
                                            &lt;td&gt;
   &lt;asp:Label ID="lblSSNError" runat="server" ForeColor="#713C2C" Text="Please enter a valid Social Security Number" Visible="False"&gt;&lt;/asp:Label&gt;
                                            &lt;/td&gt;
                                        &lt;/tr&gt;
                                        &lt;tr&gt;
                                            &lt;td&gt;
                                                &amp;nbsp;
                                            &lt;/td&gt;
                                        &lt;/tr&gt;
                                        &lt;tr&gt;
                                            &lt;td&gt;
     &lt;asp:Button ID="btnSSN" runat="server" Text="Submit SSN" AccessKey="n" TabIndex="8" ToolTip="Submit the student's SSN" /&gt;
                                            &lt;/td&gt;
                                        &lt;/tr&gt;
                                    &lt;/table&gt;
                                &lt;/asp:Panel&gt;
                    &lt;/ContentTemplate&gt;
                    &lt;Triggers&gt;
   &lt;asp:AsyncPostBackTrigger ControlID="btnSearchSSN" EventName="Click" /&gt;
   &lt;asp:AsyncPostBackTrigger ControlID="btnSSN" EventName="Click" /&gt;
                    &lt;/Triggers&gt;
                &lt;/asp:UpdatePanel&gt;
</code></pre>
