InterviewSolution
for (int i = 0; i < ListBox1.Items.Count; i++){ if(CONDITION) { ListBox1.Items[i].Attributes.CssStyle.Add("color", "GREEN"); } else ((ds.Tables[0].Rows[i][3].ToString() == "1") & (ds.Tables[0].Rows[i][2].ToString() == "1")) { ListBox1.Items[i].Attributes.CssStyle.Add("color", "red"); }}
Your experience on this site will be improved by allowing cookies. Read Cookie Policy