Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop down menu Value

Status
Not open for further replies.

brent123

MIS
Mar 21, 2006
29
0
0
US
I have a web page that has a drop down list on it. I would like to store the value the user selects in a variable. I tried using dropdownName.Value, but everytime the script runs it errors out saying The name "dropDopName" does not exist in current context. How do I access that value?

Thanks,
 
I believe you have to use the selectedvalue or selecteditem.value property.

The wisest people are those who are smart enough to realize they don't know it all.
 
That doesn't seem to be it. I don't think it can find the drop down list. I keep getting a compilation error: CS0103: The name 'selHospital' does not exist in the current context. selHospital is the name of the drop down list.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top