Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then Dim col As FieldInfo For Each col In GetType(KnownColor).GetFields If col.FieldType Is GetType(Drawing.KnownColor) Then DropDownList1.Items.Add(New ListItem(col.Name, col.Name)) End If Next End If Dim i As Integer For i = 0 To DropDownList1.Items.Count - 1 DropDownList1.Items(i).Attributes.Add("style", "background-color:" + DropDownList1.Items(i).Text) Next End Sub