Getting System.Web.Mvc.SelectListItem as options of DropDownList – Asp.net
I have a ViewBag.CategoryList which contains ViewBag.CategoryList = new SelectList(Category.GetCategories()); My View: @Html.LabelFor(model => model.Category, htmlAttributes: new { @class = "control-label col-md-2" }) @Html.DropDownListFor(model => model.Category, new SelectList(ViewBag.CategoryList), "Select Category", htmlAttributes: new {@class = "form-control"}) What I'm getting is <option>System.Web.Mvc.SelectListItem</option>…