I spotted you problem. The ID attribute in the asp:checkbox tag is not the same as the ID attribute of the client side (HTML) tag. I'll try to rectify your code, but must say that since I can't try this out it might need some tweaking on your side:
<script type="text/javascript" language="javascript">
function enableTextBox() {
var textBoxID = "<%= txtAddress.ClientID %>";
if (document.getElementById("<%= chkAssociation.ClientID %>").checked == true)
document.getElementById(textBoxID).disabled = false;
else
document.getElementById(textBoxID).disabled = true;
}
</script>
and than the control:
<asp:CheckBox Checked="false" OnChange="javascript:enableTextBox();" ID="chkAssociation" runat="server" />
<asp:TextBox ID="txtAddress" Enabled="false" Text="Test" runat="server" />
You'll have to look it up really how the client ID is fetched from the control on the server side. It could be a property like I indicated, but might as well be a method. Main point is though that the ID attribute in the server side asp:textbox and asp:checkbox tags is
NOT the same as the ID attribute that gets output into the rendered HTML.
Hope that helps you!
Best Regards,
Manfred