I\'m working in ASP.NET MVC 5 (but this most likely applies to previous versions also). Best way to ask this question is to show you the code:
Here is the View Model:>
I've always had better luck using IEnumerable
public class PersonCreateViewModel
{
public IEnumerable cities {get; set;}
public int CityId { get; set; }
public String Name { get; set; }
public String Address { get; set; }
}
Also, you are going to need a property on the view model to capture the selected value like CityId.
Then you can use:
Html.DropDownListFor(m => m.CityId, Model.cities)