panJames
asked on
<select> how to get id of selected item?
Hello experts!
I have <select> list populated dynamically:
<select id="feat1" name="feat1" title="feat1">
@foreach (var p in featQuery)
{
counter=counter + 1;
<option id="@counter">@p.Name</opt ion>
}
</select>
How can I retrieve id number of option selected by user?
To get a option I use:
value = Request.Form["feat1"];
But I do not need string, I need id here.
Thank you
panJames
I have <select> list populated dynamically:
<select id="feat1" name="feat1" title="feat1">
@foreach (var p in featQuery)
{
counter=counter + 1;
<option id="@counter">@p.Name</opt
}
</select>
How can I retrieve id number of option selected by user?
To get a option I use:
value = Request.Form["feat1"];
But I do not need string, I need id here.
Thank you
panJames
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
panJames