我想从表格的选定列填充下拉列表。
[HttpGet]
public ActionResult DeleteRole(RoleManager model)
{
//select all roleNames from db
var getRole = from r in Session.Query<RoleManager>()
select r.roleName.ToList();
return View(model);
}
查看:
@Html.DropDownListFor(Model.roleName)
它给出了一个错误,即方法'DropDownListFor'没有重载需要1个参数