I have a select with multiple items, and allow the user to select multiple options:
<select id="Emails" style="width: 100%;" size="16" multiple>
@foreach (var email in Model._Emails)
{
@:<option value="@email.Id">@email.Adress</option>
}
</select>
I want to get the selected options with the Request.Form:
[HttpPost]
public ActionResult Person(personobject obj)
{
IEnumerable<string> selectedemails = Request.Form["Emails"]; //Selected Emails
....
}
Thanks