Background: I have 4 dropdown lists on my page that all use one List of SelectListItem
to pull data from. All 4 of these dropdowns will always
In your list, need to create different SelectList entities for each of the four drop down lists like so:
@Html.DropDownListFor(x => x.SelectedItem1,
new SelectList(Model.PossibleItems, "dataValue", "textValue", Model.SelectedItem1))
@Html.DropDownListFor(x => x.SelectedItem2, Model.PossibleItems)
new SelectList(Model.PossibleItems, "dataValue", "textValue", Model.SelectedItem2))
@Html.DropDownListFor(x => x.SelectedItem3, Model.PossibleItems)
new SelectList(Model.PossibleItems, "dataValue", "textValue", Model.SelectedItem3))
@Html.DropDownListFor(x => x.SelectedItem4, Model.PossibleItems)
new SelectList(Model.PossibleItems, "dataValue", "textValue", Model.SelectedItem4))
In this example, "dataValue" and "textValue" are the properties of the SelectListItem object that correspond to your value and text elements of the drop down options.