MVC: Drop-down List

Populate the list of drop-down options (using “ID” and “Description”) from within the Controller:

ViewBag.DropDownOptions = new SelectList(

Then create a Drop-Down List within the View. Model.ID should refer to the source value, and then the list of options:

    model => model.ID, 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.