When scaffolding Controllers and Views (for say, a simple CMS Admin functionality for a given Object), you may find that your Select dropdowns are not populated with any SelectListItems (in the form of <option> tags).
This is because there is a bug in the Visual Studio 2015 scaffolder which, while correctly implemented in the Create view, is not in the Edit view.
You will end up with:
<select asp-for="PropertyId" asp-items="ViewBag.MyItems" />
But what you need is:
<select asp-for="PropertyId" asp-items="ViewBag.MyItems"></select>
Easy to miss.
;
Comments
Please consider what you post!
Chillax if you're angry.