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

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -