title: Show and hide panel using radio buttons
body: <p>I have two <code>radio buttons</code> and two <code>panels</code> on my webpage and I would like to <code>show</code> panel 1 when radio button1 checked changed and hide panel2 and similarly panel2 needs to be shown when radio button2 checked changed and hide panel1.</p>
  
  <p>This is how I have done with no success</p>
  
  <p>Here are my radio buttons:</p>
  
  <pre><code>&lt;asp:RadioButton ID="RadioButton1" runat="server" Text="Text" ForeColor="White" GroupName="selection" OnCheckedChanged="RadioButton1_CheckedChanged"/&gt;
  
  &lt;asp:RadioButton ID="RadioButton2" runat="server" Text="Image" ForeColor="White" GroupName="selection" OnCheckedChanged="RadioButton2_CheckedChanged"/&gt;
  </code></pre>
  
  <p>This is RadioButton1_CheckedChanged:</p>
  
  <pre><code>If RadioButton1.Checked = True Then
              RadioButton2.Checked = False
              Panel1.Visible = True
              Panel2.Visible = False
   End If
  </code></pre>
  
  <p>This is RadioButton2_CheckedChanged:</p>
  
  <pre><code> If RadioButton2.Checked = True Then
              RadioButton1.Checked = False
              Panel1.Visible = False
              Panel2.Visible = True
   End If
  </code></pre>