I am trying to dynamically enable (or disable) an ASP textBox when the check changes in the adjacent checkBox.
When I put "OnCheckedChanged" in the CheckBox I get the error: "CS0149: Method name expected"
The CheckBox is:
<asp:checkbox id="S5_other" runat="server" text="Other" OnCheckedChanged="EnableTextBox()" Checked="True"></asp:checkbox>
EnableTextBox() is in javascript
<Script language =javascript>
function EnableTextBox()
{
...
enableField("myTextBox", true);
...
}
</SCRIPT>
Thanks in advance,
When I put "OnCheckedChanged" in the CheckBox I get the error: "CS0149: Method name expected"
The CheckBox is:
<asp:checkbox id="S5_other" runat="server" text="Other" OnCheckedChanged="EnableTextBox()" Checked="True"></asp:checkbox>
EnableTextBox() is in javascript
<Script language =javascript>
function EnableTextBox()
{
...
enableField("myTextBox", true);
...
}
</SCRIPT>
Thanks in advance,