for(int i=1; i<=10; i++) { li.Items.Add(new ListItem("Item" + i)); if (i%2 == 0) { li.Items[i-1].Attributes["itemType"] = "Even"; } else { li.Items[i-1].Attributes["itemType"] = "Odd""; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)