This can easily be achieved with JavaScript, which I would recommend over
the postback method, to avoid making unnecessary server round-trips.
// Enable/Disable the textbox, when the checkbox is clicked
function ToggleTextBox(e)
{
var txtbox = document.forms[0].elements["txtbox"];
txtbox.disabled = (!e.checked);
}
</script>
<!-- Form Sample Code -->
<form>
<input name="chk" type="checkbox"
onClick="ToggleTextBox(this)">Test<br><br>
<input name="txtbox" type="text" size="50" value="blah">
</form>
Hope this helps,
Mun
"Mike P" <mrp@telcoelectronics.co.uk> wrote in message
news:%239%23ss%23PrDHA.2416@TK2MSFTNGP10.phx.gbl.. .[color=blue]
> How do I capture the click event of the check box so that every time the
> box is ticked a text box is enabled, and every time the box is unticked
> a text box is disabled?
>
>
> Thanks,
>
> Mike
>
>
>
>
> *** Sent via Developersdex
http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it![/color]