ASP.NET MVC select tag does not work unless specifically closed

I found out after a bit of pulling my hair out today that if you want to display a dropdown menu via a select tag inside a .cshtml page in your ASP.NET MVC project, you had better close the tag with </select>, because if you rely on the self closing tag (think <select />), then your asp-items will get eaten, along with other miscellaneous things.

Leave a Reply