2011-05-16 4 views
0

나는 아래의 코드를 사용하여 radiobuttonlist의 항목에 대한 다른 배경 색상에 노력하고, 비슷한 코드가 DropDownList로 항목radiobuttonlist에있는 라디오의 대체 배경색은 무엇입니까?

  If color Then 
         rdBtnList.Items.FindByText(lstItem.Text).Attributes.CssStyle.Add("style", "background: white;") 
         rdBtnList.Items.FindByText(lstItem.Text).Attributes.CssStyle.Add("style", "background-color: white;") 
        Else 
         rdBtnList.Items.FindByText(lstItem.Text).Attributes.CssStyle.Add("style", "background-color: LightSlateGray;") 
         rdBtnList.Items.FindByText(lstItem.Text).Attributes.CssStyle.Add("style", "background: LightSlateGray;") 
        End If 

        color = Not color 

에 노력하고 있습니까 내가 모르는 뭔가가?

감사

rdBtnList.Items.FindByText(lstItem.Text).Attributes.Add("style", "color: black;font-weight:bold;") 
근무

답변

관련 문제