HighTechTalks DotNet Forums  

DropDownList selected value

ASP.net ASP.net discussions (microsoft.public.dotnet.framework.aspnet)


Discuss DropDownList selected value in the ASP.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Alan T
 
Posts: n/a

Default DropDownList selected value - 07-05-2010 , 12:15 AM






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.

Reply With Quote
  #2  
Old   
Mr. Arnold
 
Posts: n/a

Default Re: DropDownList selected value - 07-05-2010 , 12:31 AM






Alan T wrote:
Quote:
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.

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.