Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 1.22 KB

File metadata and controls

21 lines (12 loc) · 1.22 KB

How to bind dropdownlist in asp net mvc application

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.

  1. Static Values
  2. ViewBag Property Values
  3. Model values

Files

  1. HTML Views - This folder has different views for each type of binding - StaticBind.cshtml, BindWithModel.cshtml, BindJSONData.cshtml
  2. Home Controller - has different ActionMethods for different ways to bind dropdownlist.

Below image shows the MVC DropDownList binded with values

ASP.NET MVC DropDownList bindings

For more details visit - how to bind dropdownlist in ASP.NET MVC application