日期:2014-05-17 浏览次数:20438 次
rotected void btnSet_Click(object sender, EventArgs e) { foreach (ListItem item in lbCxLeft.Items) { if (item.Selected) { lbCxRight.Items.Add(item); } } foreach (ListItem item in lbCxRight.Items) { if (lbCxLeft.Items.FindByValue(item.Value) != null) { lbCxLeft.Items.Remove(item); } } } protected void btnSetAll_Click(object sender, EventArgs e) { foreach (ListItem item in lbCxLeft.Items) { lbCxRight.Items.Add(item); } lbCxLeft.Items.Clear(); } protected void btnDel_Click(object sender, EventArgs e) { foreach (ListItem item in lbCxRight.Items) { if (item.Selected) { lbCxLeft.Items.Add(item); } } foreach (ListItem item in lbCxLeft.Items) { if (lbCxRight.Items.FindByValue(item.Value) != null) { lbCxRight.Items.Remove(item); } } } protected void btnDelAll_Click(object sender, EventArgs e) { foreach (ListItem item in lbCxRight.Items) { lbCxLeft.Items.Add(item); } lbCxRight.Items.Clear(); }