I am trying to understand the best way of implementing a DropDownList
in ASP.NET MVC 2 using the DropDownListFor
helper. This is a multi-part ques
You could do something like:
<%= Html.DropDownListFor((x => x.ListItems), Model.ListItems, "")%>
or
<%= Html.DropDownList("ListItems", Model.ListItems, "")%>
The last param 'optionLabel' makes a blank list item
In this case, you can see ListItems is a property of the model.
I have made the view strongly typed to the model also.