Change Color of listbox items based on conditions

时间:2016-02-12 21:52:26

标签: c# asp.net listbox

i have a list box that checks the status of list of printers by pinging to that ip, if the connection times out i would like for it to show up in "red" how can i do this, i am using the following code:

$rootScope.$broadcast('unauthorized http error', { somedata: {} });

please help :(

1 个答案:

答案 0 :(得分:0)

Are you looking to change the color server-side or do it in the client? If your just wanted to change it from ASP.NET/Server side, then just create a new list item and give it a style attribute of color:red before adding it to the listbox-

char