if(chk.checked) { textbox.visible=true; } else { textbox.visible=false; }
<script language="javascript" type="text/javascript"> function forRentClicked(sender) { var tb1 = document.getElementById('<%= TextBox1.ClientID %>'); tb1.style.display = sender.checked?'inline':'none'; } </script>
<asp:checkbox id="CheckBox1" runat="server" onclick="forRentClicked(this)" checked="true" /> <asp:label id="Label1" runat="server" text="Rental rate per week:"></asp:label> <asp:textbox id="TextBox1" runat="server" ></asp:textbox>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)