Skip to content

geeksarray/how-to-bind-dropdownlist-in-asp-net-mvc-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

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