<script  runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
   if check1.Checked then
     panel1.Visible=false
   else
     panel1.Visible=true
   end if
End Sub
</script>


<html>
<body>

<form runat="server">
<asp:Panel id="panel1"
runat="server" BackColor="#ff0000"
Height="100px" Width="100px">
Hello World!
</asp:Panel>
<asp:CheckBox id="check1"
Text="Hide Panel control"
runat="server"/>
<br /><br />
<asp:Button Text="Reload" runat="server" />
</form>

</body>
</html>