ASP.NET HTML 控件 Panel

asp.net html 控件 panel

<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>


<!doctype html>
<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>
相关文章