fdkgfosfskjdlsjdlkfsf
fdkgfosfskjdlsjdlkfsf

Reputation: 3303

Distinguish between disabled and enabled dropdownlist?

We have an asp.net webform with several textboxes, dropdownlists and buttons, like the image below. At any moment, there will be several controls disabled and a few enabled.

In the webform below, DropDownList DB1 and DB2 are disabled, while DB3 isn't. How can the user visually know that DB1 & DB2 are disabled? With the textbox and the button you can see the difference.

I believe the Windows Form has a read-only property that sets the background to gray; unfortunately, that doesn't exist with the web DropDownList.

Thanks.

enter image description here

Upvotes: 0

Views: 394

Answers (1)

Martín Misol
Martín Misol

Reputation: 333

Also, if you are using ASP.NET 4, any control that is set Enabled = false will be assigned a CSS class named aspNetDisabled.

You can define a styles for that CSS class, maybe something like this:

.aspNetDisabled {
   color: grey;
}

Upvotes: 2

Related Questions