asp.net - Show/Hide table when checkbox is checked -
is there way show/hide table when checkbox checked? i've done javascript, know if can done code behind.
protected sub chkaccept1_checkedchanged(sender object, e system.eventargs) handles chkaccept1.checkedchanged if chkaccept1.checked = true tableid.visible = true else tableid.visible = false end if end sub
yes, code work. please make sure have autopostback="true"
<asp:checkbox runat="server" id="chkaccept1" autopostback="true" /> <asp:table id="tableid" runat="server"> <asp:tablerow id="tablerow1" runat="server"> <asp:tablecell id="tablecell1" runat="server"> test </asp:tablecell> </asp:tablerow> </asp:table>
Comments
Post a Comment