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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -