I have two list boxes and I can move one item at a time from one list box to another. I need to be able to move up to 4 selections, no more than 4, at once. Here's what I have right now.
protected void selectTheme32btn_Click(object sender, EventArgs e)
{
if (lbThemed32.SelectedIndex == -1)
{
return;
}
ListItem item = new ListItem();
if (lbThemed32Sel.Items.Count <= 3)
{
item.Value = lbThemed32.SelectedItem.Value;
item.Text = lbThemed32.SelectedItem.Text;
lbThemed32Sel.Items.Add(item);
lbThemed32.Items.Remove(item);
lblChoose4Validation.Visible = false;
}
else
{
lblChoose4Validation.Visible = true;
return;
}
}
The lbThemed32 is the list box tha ...
Go to the complete details ...