This is how you can set, say Red color, to the selected ASP.NET ListBox items:
<asp:ListBox runat="server" ID="ListBox1">
<asp:ListItem Text="Text1"></asp:ListItem>
<asp:ListItem Text="Text2"></asp:ListItem>
</asp:ListBox>
if(ListBox1.SelectedItem != null)
ListBox1.SelectedItem.Attributes["style"] = "color:red";
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…