public partial class Move : System.Web.UI.Page
{
public void btnLeftTransfer_Click(object sender, EventArgs e)
{
int count = listBox1.Items.Count;//assigning items in listbox it into count variable
if (count != 0)//checking the conditions
{
for (int i = 0; i < count; i++)
{
listBox2.Items.Add(listBox1.Items[i]);
}
}
listBox1.Items.Clear();//clear the listbox after transfering records.
}
description:
it is not select multiple values and not save in database....please help me....
public void btnRightTransferAll_Click(object sender, EventArgs e)
{
int count = listBox2.Items.Count;
if (count != 0)
{
for (int i = 0; i < count; i++)
{
listBox1.Items.Add(listBox2.Items[i]);
}
}
listBox2.Items.Clear();
}
//code to transfer records from listbox1 to Listbox2 on select records..
public void btnSingleSelectTransfer_Click(object sender, EventArgs e)
{
//Checking Conditions of selection of listbox.
if (listBox1.SelectedIndex > -1)
{
listBox2.Items.Add(listBox1.SelectedItem);
listBox1.Items.Remove(listBox1.SelectedItem);
}
}
//code to transfer records from listbox2 to listbox1 on slect records.
public void btnSingleRightTransfer_Click(object sender, EventArgs e)
{
if (listBox2.SelectedIndex > -1)
{
listBox1.Items.Add(listBox2.SelectedItem);
listBox2.Items.Remove(listBox2.SelectedItem);
}
}
}