Hi All,
I have populated a listbox control with some items and I then want to remove those selected by the user:
trouble is as soon as the first item is removed code crashes because the foreach is now out of sync.Code:foreach (ListItem li in ContactList.Items)
{
if (li.Selected == true)
{
ContactList.Items.Remove(li.Text);
}
}
HOw can I force only those items selected to be removed

