Find value of selected item in Drop down menu.
- by Ozaki
I have a drop down menu in an ASPX page along the lines of:
<form>
<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat" selected="selected">Fiat</option>
<option value="audi">Audi</option>
</select>
</form>
That is dynamically generated from another controller (value and label).
After the user selects one of the options I need to find out what the selected value/label (will be the same) is so I can hit an update button and retrieve the data on that option.
What would be the easiest way to find out the value of the user "selected" option?