Change color of disabled radiobutton list element
问题 I've got a radiobuttonlist with a bunch of list items, some of them disabled. The label control beside the radio button turns gray, which can be hard to read. How do I change the color of the label? I've tried CSS, changing the forecolor - nothing seems to work: currentButton.Attributes.Add("class", "disabled"); Any ideas? 回答1: Although I've never used asp.net built-in controls, I'm guessing here that your RadioButtonList is trying to be smart enough and renders some CSS (inline or class/id)