Dropdownlist control in MVC using HTML Helpers

First here we show dropdownlist using hard coded value.

Write following code to your view.

DROPDOWNLIST

Now run application.(ctrl + F5).

DROPDOWNLIST
Now write code in Index action for retrieve data from database.

DROPDOWNLIST

Right click on Index action and Add View and write following code.

DROPDOWNLIST

Now run application.(ctrl + F5).

DROPDOWNLIST