0
如何为Html.dropdownlistFor(m => m.fieldname)设置默认列表值?下拉列表的默认值
如何为Html.dropdownlistFor(m => m.fieldname)设置默认列表值?下拉列表的默认值
这是你通常如何做到这一点:
<%= Html.DropDownListFor(x => x.FieldName, new SelectList(Model.ListOfOptions, "key", "value"), "-- Default Value --")%>