Enabled property

R

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!
 
J

John Sivilla

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
 
R

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top