开发者

alternate background color for radios in radiobuttonlist?

开发者 https://www.devze.com 2023-03-06 07:18 出处:网络
I am trying to alternate background colors for items in radiobuttonlist using the below code, similar codeis working on dropdownlist items

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

精彩评论

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