<script>
function setText(e)
{
var t= document.getElementById('<%=myTextbox.ClientID%>');
t.disabled = !e.checked;
}
</script>
<asp:checkbox id="chk" runat="server" onclick="setText(this);"/><br>
<asp:textbox id="myTextbox" runat="server" Enabled="false" />
-- bruce (sqlwork.com)
You are also right that it could be done gracefully with an AJAX
UpdatePanel. This would be less efficient because it requires a round trip
to the server, but if you fear JavaScript then it would be the simpler
solution for you. If your app doesn't need to be optimized for scalability
then this solution would likely be sufficient.
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
http://iPhonePlaza.net
<COHEN...@lycos.com> wrote in message
news:2320682a-19bb-4fa5...@k37g2000hsf.googlegroups.com...