Enabled property

Discussion in 'ASP .Net' started by Rob, Apr 30, 2004.

  1. Rob

    Rob Guest

    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!
    Rob, Apr 30, 2004
    #1
    1. Advertising

  2. Rob

    John Sivilla Guest

    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
    John Sivilla, May 1, 2004
    #2
    1. Advertising

  3. Rob

    Rob Guest

    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" <> wrote in message
    news:...
    > 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
    Rob, May 1, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Hendrickson

    Enabled property

    Paul Hendrickson, Aug 17, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,037
    Arpi Tot
    Aug 19, 2003
  2. Gabor
    Replies:
    3
    Views:
    602
    Jacob Yang [MSFT]
    Aug 26, 2003
  3. Rick Shide

    Button.Enabled property not being set

    Rick Shide, Sep 11, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    604
    Rick Shide
    Sep 11, 2003
  4. Cipher
    Replies:
    3
    Views:
    1,511
    coollzh
    Apr 30, 2004
  5. Gill Smith
    Replies:
    4
    Views:
    8,854
    Gish Smith
    May 22, 2004
Loading...

Share This Page