Controller中:
ViewBag.modules = new SelectList(集合.ToList(), "下拉框键", "下拉框值");
View中:
@Html.DropDownList("将要返回的值", ViewBag.modules as IEnumerable<SelectListItem>, "--请选择--");
Controller中:
ViewBag.modules = new SelectList(集合.ToList(), "下拉框键", "下拉框值");
View中:
@Html.DropDownList("将要返回的值", ViewBag.modules as IEnumerable<SelectListItem>, "--请选择--");