I know there are multiple threads on how to get the selected value of a DropDownList. However I can't find the right way to get this value from a partial view in my controller.
This is my partial view:
@model List<aptest.Models.answer>
@Html.DropDownList("dropdownlist", new SelectList(Model, "text", "text"))
<button type="submit">next</button>
Razor
Controller
In order to get dropdown value, wrap your select list in a form tag. Use models and
DropDownListFor
helperRazor View
Controller and other classes
And if you use partial view, simply pass your model in it: