Posted on: 12/10/2013 4:18:22 AM | Views : 917

hi,
 I want to color default value in list box when page loads.  I did as follows to get default value
for each li as listitem in listbox1.items if(li.text = "my text") li.attributes.add("style","background-color:blue") end if next And now I want to clear this item color back to default color , when I select any other item in the list box. for example, my listbox contain values
AA
BB
CC
DD
and default value = BB , so I set background color : blue to the item BB
and now when I click on CC it selects CC and should change the background-color of BB to white. I tried following on selectedindex change of listbox
Protected Sub listbox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles listbox1.SelectedIndexChanged for each li as listitem in listbox1.items li.attri ...

Go to the complete details ...