title: hiding content in asp.net
body: <p>Is there a way to hide a section of code in asp.net so that is only becomes visible if something happens? </p>
  
  <p>I have this, But it doesn't work. </p>
  
  <pre><code>&lt;asp:DropDownList ID="drop" runat="server" Width="100" Height="25" BackColor="#CEECF5" CssClass="Selection"&gt;
     &lt;asp:ListItem Text="Rock" Value="1" /&gt;
     &lt;asp:ListItem Text="Paper" Value="2" /&gt;
     &lt;asp:ListItem Text="Scissor" Value="3" /&gt;
     &lt;asp:ListItem Text="Lizard" Value="4" /&gt;
     &lt;asp:ListItem Text="Spock" Value="5" /&gt;
  &lt;/asp:DropDownList&gt;
     &lt;asp:Button Text="Play Hand" ID ="play" runat="server" BackColor="WhiteSmoke" Width="100" Height="25" CssClass="Button"/&gt;
  
  &lt;asp:View ID="GameResults" ViewStateMode="Disabled"&gt;
     &lt;br /&gt; 
       &lt;table&gt;
          &lt;tr&gt;
            &lt;td&gt;&lt;asp:Image ID="PlayedHand" runat="server"  /&gt;&lt;/td&gt;
            &lt;td&gt;&lt;asp:Image ID="RandomHand" runat="Server"  /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
            &lt;td&gt;&lt;asp:Label ID="PlayedLabel" Text="You played ....." runat="server" /&gt;&lt;/td&gt;
            &lt;td&gt;&lt;asp:Label ID="RandomLabel" Text="Opponent played ....." runat="server" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/asp:View&gt;
  </code></pre>
  
  <p>I am looking for a way to make the results only appear if the button is pressed and the game is evaluated. </p>
  
  <p>I know i can do the individual elements, But that doesn't help with the HTML table tags. So i would prefer for the whole object to be encapsulated. </p>
  
  <p>Is there a way to hide that whole content block? </p>