How to transfer Multiple listbox text to another listbox using C#.net please tell me how to do it asap.....
listBox1.Items.Add("hello"); listBox1.Items.Add("world"); foreach (string item in listBox1.Items) listBox2.Items.Add(item);
I want data to be binded from database for one listbox and transfer to another listbox by selecting multiple text plz help...
If you are using databound listbox dont directly bound listbox to dataset / datable, the best option is populate an ArrayList with dataset and bound listbox with arraylist it is easy to remove and add items in arraylist and its effect is automatically shown in listbox
According my understanding, you have one list box populated from database. And you select multiple items from that and you want those to be moved to another list box. Is that what you want? If so, you can use following code. foreach (ListItem Item in ListBox.Items) { if (Item.Selected == true) { listBox2.Items.Add(Item.Text); } } Code (markup):