0

U have following line in my view but unable to set selected values.

@Html.DropDownListFor(m=>Model.Profile.PreferedLocations, new MultiSelectList(Model.Locations, "Key", "Value", Model.Profile.PreferedLocations), new { @class = "selectpicker form-control", multiple = "multiple", @data_max_options = "3" })

In the code above, I can see correct values for locations available and already set PreferedLocations. Please see the screenshot below:

Screenshot of quick watch

enter image description here

Amit Kumar
  • 5,888
  • 11
  • 47
  • 85

0 Answers0