DropDownList selected value

A

Alan T

I think this is a basic question:

I got a dropdownlist bind with a datasource, how do I get the value of the
selected item?
eg.
Displayed text:

Andy (ID = 3)
Apple (ID = 1)
Candy (ID = 2)
John (ID = 5)
Mandy (ID = 4)


If I select John, then I need to get the 5.
 
M

Mr. Arnold

Alan said:
I think this is a basic question:

I got a dropdownlist bind with a datasource, how do I get the value of the
selected item?
eg.
Displayed text:

Andy (ID = 3)
Apple (ID = 1)
Candy (ID = 2)
John (ID = 5)
Mandy (ID = 4)


If I select John, then I need to get the 5.

You use the dropdownlist selected_indexed_changed event and the
dropdownlist.selected.value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top