This article describes how you can bind your MVC DropDownList in different ways.
You can bind DropDownList in many ways. Here I will be describing binding it with static values, with ViewBag dynamic property, with model values, and with database objects.
- Static Values
- ViewBag Property Values
- Model values
- HTML Views - This folder has different views for each type of binding - StaticBind.cshtml, BindWithModel.cshtml, BindJSONData.cshtml
- Home Controller - has different ActionMethods for different ways to bind dropdownlist.
Below image shows the MVC DropDownList binded with values
For more details visit - how to bind dropdownlist in ASP.NET MVC application