Daily Archives: December 8, 2008

1 post

Adding Background Color to RadioButtonList Items

With the same CSS and similar code as I posted before for adding background color to CheckBoxList items, we can do the same thing to a RadioButtonList control. Here is the code-behind file: Private Sub RadioButtonList2_DataBound(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles RadioButtonList2.DataBound Dim cols As Integer = Me.RadioButtonList2.RepeatColumns If (cols = 0) Then cols = 1 End If For i As Integer = 0 To Me.RadioButtonList2.Items.Count – 1 Dim j As […]