In my MVC application, I need to add a dropdown that would show a list of domain names.
I already have a ViewModel that contains multiple properties. I am not sure w
Once you have the list on your controller pass it to the view (as model or using ViewBag) and then use the helper:
Html.DropDownList(
string name,
IEnumerable selectList,
string optionLabel,
object htmlAttributes)
Or (MVC 3)
@Html.DropDownListFor(model => model.Property.ID,
new SelectList(model.PropertyList, "ID", "Type"))