在两个ListBox之间移动选择项目 code: protected void Button2_Click(object sender, EventArgs e) { if (ListBox2.SelectedItem != null) { ListBox3.Items.Add(ListBox2.SelectedItem); ListBox2.Items.Remove(ListBox2.SelectedItem); } } protected void Button3_Click(object sender, EventArgs e) { foreach (ListItem item in ListBox2.Items) { ListBox3.Items.Add(item); } ListBox2.Items.Clear(); } protected void Button4_Click(object sender, EventArgs e) { if (ListBox3.SelectedItem != null) { ListBox2.Items.Add(ListBox3.SelectedItem); ListBox3.Items.Remove(ListBox3.SelectedItem); } } protected void Button5_Click(object sender, EventArgs e) { foreach (ListItem item in ListBox3.Items) { ListBox2.Items.Add(item); } ListBox3.Items.Clear(); } 结果如图