asp.net mvc - Populating Html.Dropdownlist -
I am trying to pass in the array in this dropdown list in my partial view:
& lt;% Html.DropDownList (Model.Name, Model.Options); & Gt%;
The options are separate courses from commas. It is expected of an IEnumerable so I'm not sure what is missing here is not accepting the array.
You can try this:
& lt;% Html.DropDownList (Model.Name, New SelectList (Model.Options)); & Gt%;
Comments
Post a Comment