Populating Drop Down Box with Db Data
问题 Have managed to get this working now. As expected it was simpler than I was making it. Hopefully this can save someone looking to do the same thing some time in the future. Have amended code below to the working code. Thanks for the help all. Partial View Returning the Drop Down: @model Project.Models.Item @Html.DropDownListFor(m=>m.CategoryId,new SelectList(ViewBag.CategoryList,"CategoryId","CategoryName"),"Select") Controller: [HttpGet] public ActionResult Create() { ViewBag.CategoryList =