Bind Data from drop down and listbox to Label
I have to get data from dropdown and listbox then bind it and show to label on my aspx page.Any can help me
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.
Pankaj Kumar ChoudharyPosted Feb 22, 2015, 8:16 AM
Label2.Text = ListBox1.SelectedValue.ToString();
For DropDownList :
Label2.Text = DropDownList1.SelectedValue.ToString();
and select the autopostBack property true of Both
Khargesh RajputPosted Feb 22, 2015, 8:08 AM
Label1.text=dropdown.selecteditem.text;