I have a whole table full of checkboxes each of which is associated with a label. Both checkboxes and labels have runat="server". What I'd like to do is to write a small script that will make visible or hide the label depending on the check state of the checkbox.
function ShowHideLabel(cbControl, lControl)
lControl.Visible = cbControl.Checked;
<asp:checkbox id="cb1" runat="server" text="CheckBox 1" OnClick="?" />
<asp:label id="l1" runat="server" text="I am visible" />
What do I need to put in OnClick for this to work?
View Complete Post