Setting ListBox Items to different colors
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hi Guys, I have the following code that populates a ListBox for me. Currently all of my items are getting inserted into the ListBox. My goal is to detect if the ListBox item is an orphan page. If so then I want to color the background of that item to red using the style tag. I am able to detect if the file is an orphan, however, I am not able to add the style tag to that item. Any ideas on how to do this?
iStyle = " background-color: Red "; if (tab.ShowTab == true) { TabItem t = new TabItem(); t.TabName = tab.TabName; t.TabId = tab.TabId; t.TabOrder = tab.TabOrder; portalTabs.Add(t); portalTabs.Add("iStyle"); }
Thanks in Advance!