furasarkfigue
New Member
I have two list boxes, I am trying to automatically select the second list from from the first one. The trouble is, I get stuck in the second Foreach loop, and the first one doesn't run insync with it. Can someone take a look, thanks.\[code\] foreach (ListItem item in this.clb_Departments.Items) { foreach (ListItem it in this.cbl_fDepartments.Items) { if (item.Value =http://stackoverflow.com/questions/14490254/="2") { if (it.Value =http://stackoverflow.com/questions/14490254/="2") { if (item.Selected == true) { it.Selected = true; break; } } } if (item.Value =http://stackoverflow.com/questions/14490254/="3") { if (it.Value =http://stackoverflow.com/questions/14490254/="3") { if (item.Selected == true) { it.Selected = true; } } } } \[/code\]