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
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Khargesh RajputRank #616 · 3.9K reputationPosted Feb 22, 2015, 3:08 AM EST
Label1.text=dropdown.selecteditem.text;
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Feb 22, 2015, 3:16 AM EST
Label2.Text = ListBox1.SelectedValue.ToString();
For DropDownList :
Label2.Text = DropDownList1.SelectedValue.ToString();
and select the autopostBack property true of Both