开发者

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;")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜