Link to home
Start Free TrialLog in
Avatar of mrl72
mrl72

asked on

How do you enable checkbox from code behind that is already in a disabled state?

I have an asp checkbox on a form that is disabled during page load using CheckBox1.InputAttributes.Add("disabled", "disabled"). On the form is a text box which is filled via a server side event. In that event the checkbox should then be enabled. I have tried using checkbox1.enabled=true or CheckBox1.InputAttributes.Add("disabled", "") but the checkbox remains disabled.
Avatar of David Robitaille
David Robitaille
Flag of Canada image

disable the check box during page load using checkbox1.enabled=false instead
Avatar of mrl72
mrl72

ASKER

That doesn't work, the checkbox remains disabled.
is the checkbox is into some update panel or something?
submit the aspx code please
ASKER CERTIFIED SOLUTION
Avatar of David Robitaille
David Robitaille
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So did that works?