alternate background color for radios in radiobuttonlist?
I am trying to alternate background colors for items in radiobuttonlist using the below code, similar code is working on dropdownlist items
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: whi开发者_如何学Pythonte;")
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
Am I missing something?
Thanks
that worked
rdBtnList.Items.FindByText(lstItem.Text).Attributes.Add("style", "color: black;font-weight:bold;")
精彩评论