Perhaps you should first save the list to a shared collection, and then sort it. Something like that:
List<ListItem> list = new List<ListItem>(lbxCustomers.Items.Cast<ListItem>()); list = list.OrderBy(li => li.Text).ToList<ListItem>(); lbxCustomers.Items.Clear(); lbxCustomers.Items.AddRange(list.ToArray<ListItem>());
source share