I have an ASP.NET MVC5 application in which I have a form which the user have to choose an option in a dropdownlist before submitting (an Ajax call to a method in a controller).
When submitting, I want to be able to access the TEXT of the option, not the Value in the Controller. How is this possible?
This is what the code in the View looks like:
<select name="adressID" id=" adressID ">
<option>Choose Adress</option>
@foreach (var address in @Model.Address)
{
<option value="@address.ID">@Html.Raw(address.Name)</option>
}
</select>
/ElC