我想从表格的选定列中填充下拉列表。
[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个参数