标签: asp.net-mvc-2
如何为Html.dropdownlistFor设置默认列表值(m => m.fieldname)?
答案 0 :(得分:3)
通常这样做:
<%= Html.DropDownListFor(x => x.FieldName, new SelectList(Model.ListOfOptions, "key", "value"), "-- Default Value --")%>