Server Error in '/' Application.
The ViewData item that has the key 'Name' is of type 'System.String' but must be of type 'IEnumerable<SelectListItem>'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The ViewData item that has the key 'Name' is of type 'System.String' but must be of type 'IEnumerable<SelectListItem>'.
Source Error:
Line 34: @Html.Label("Select Your User Type", new { @class = "col-md-2 control-label" })
Line 35: <div class="col-md-10">
Line 36: @Html.DropDownList("Name")
Line 37: </div>
Line 38: </div>
Source File: d:\users\gir\asp.net-action-methods\CustomRoles\Views\Account\Register.cshtml Line: 36
Stack Trace:
[InvalidOperationException: The ViewData item that has the key 'Name' is of type 'System.String' but must be of type 'IEnumerable<SelectListItem>'.]
System.Web.Mvc.Html.SelectExtensions.GetSelectData(HtmlHelper htmlHelper, String name) +355