I had doubt regarding populating all items from dropdownlistbox to list box by clicking on button in code behind using c#.
For example
As in below screenshot A,B,C,D Should be loaded to list box by clicking Submit button.

Thanks.

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pradeep ChandrakerPosted Jul 13, 2011, 9:52 PM
Sandeep ShekhawatPosted Jul 13, 2011, 12:08 PM
protected void Button1_Click(object sender, EventArgs e)
{
foreach (ListItem li in DropDownList1.Items)
{
ListBox1.Items.Add(li.Text);
}
}
it is button click event:Button1_Click
DropDownList1 id dropdownlist id
ListBox1 listbox id