Skip to content
Loading
Populating List with User Roles  
  • class="form-group">  
  • @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })  
  • class="col-md-10">  
  • @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })  
  •   
  •   
  •   
  • class="form-group">  
  • @Html.Label("Select User Type"new { @class = "col-md-2 control-label" })  
  • class="col-md-10">  
  • @*@Html.DropDownList("Name")*@  
  • @Html.DropDownList("Name", (SelectList)ViewBag.Roles, "Select ...")  
  • @*@Html.DropDownListFor(m => m.UserRoles,new SelectList(ViewBag.UserRoles,"Value","Text"), new {@class="form-control"})*@  
  •   
  •   
  • class="form-group">  
  • class="col-md-offset-2 col-md-10">  
  • "submit" class="btn btn-default" value="Register" />  
  •   
  •   
  • I've read most articles on the problem and still now solution, Please help.

    8 Replies

    Know the answer? Post it — somebody with the same question will find it here.