The Message text: |
Hi!,
This email was created by [MemberName] <[MemberEmail]> who thought you would be interested in the following Article:
"Remove multiple items from ListBox" public static void RemoveSelected(this ListControl source){ foreach (var item in source.Items.Cast().Where(li => li.Selected).ToList()) source.Items.Remove(item);}protected void btnRemove_Click(object sender, EventArgs e){ lstCity.RemoveSelected();}
CodeProject also contains hundreds of articles, free source code samples and applications to help in your day to day programming. Why not give it a try! |