protected void Button1_Click(object sender, EventArgs e)
{
if (ListBox1.Items.Count > 0)
{
if (ListBox2.Items.FindByValue(ListBox1.SelectedValue) == null)
{
int i = 0;
while (i < ListBox1.Items.Count)
{
if (ListBox1.Items[i].Selected == true)
{
ListBox2.Items.Add(ListBox1.Items[i]);
ListBox1.Items.Remove(ListBox1.Items[i]);
}
else
i += 1;
}
}
}
else
{
}
}
protected void Button2_Click(object sender, EventArgs e)
{
if (ListBox2.Items.Count > 0)
{
//if (ListBox1.Items.FindByValue(ListBox2.SelectedValue) == null)
//{
int i = 0;
while (i < ListBox2.Items.Count)
{
if (ListBox2.Items[i].Selected == true)
{
ListBox1.Items.Add(ListBox2.Items[i]);
ListBox2.Items.Remove(ListBox2.Items[i]);
}
else
i += 1;
}
//}
}
else
{
}
}