By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,375 Members | 3,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,375 IT Pros & Developers. It's quick & easy.

Enabled property

P: n/a
Rob

Is there a way of setting a separate style for a control when it is in
disabled? Currently if the control is in a disabled state it is greyed out.
For example a text box when disabled is painted with grey foregroud and
grey background! The only thing that makes it readable is, that the shades
of gray are different. I can swallow the way that text boxes are treated,
but what happens to link buttons is not palatable. They are displayed with
some horrible 3D effect, when my intention is to have them with no change in
style regardless if they are enabled or not. HELP!
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
This is really not an ASP.NET issue. ASP.NET sends a
disabled="disabled" attribute-value to the browser when the Enabled
property is set on the control. When this is done, the broswer, not
the control sets the foreground color and nothing overrides it, not a
style attribute nor a FONT tag. You could change other style though,
like the background color...

I tried using an attribute selector [disabled="disabled"] but that did
not work either.

I checked the CSS Specification, because that would be a logical place
to put an override, but I could not find any mention of the disabled
property.

hope this helps
Nov 18 '05 #2

P: n/a
Rob
John,

Thanks for the answer. I knew that it was the case with dropdown boxes, I
did not suspected the other controls...

Regards,

Rob
"John Sivilla" <si******@hotmail.com> wrote in message
news:b2**************************@posting.google.c om...
This is really not an ASP.NET issue. ASP.NET sends a
disabled="disabled" attribute-value to the browser when the Enabled
property is set on the control. When this is done, the broswer, not
the control sets the foreground color and nothing overrides it, not a
style attribute nor a FONT tag. You could change other style though,
like the background color...

I tried using an attribute selector [disabled="disabled"] but that did
not work either.

I checked the CSS Specification, because that would be a logical place
to put an override, but I could not find any mention of the disabled
property.

hope this helps

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.