I want to populate a dropdownlist from a selected column of a table.
[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);
}
View:
@Html.DropDownListFor(Model.roleName)
It is giving an error that No overload for method 'DropDownListFor' takes 1 arguments