dimanche 14 juin 2015

How to create a dynamic dropdown in mvc

How to create a dropdown whose option values are coming from controller. controller will be getting it from database table's any column value.

for example if that dropdown is for selecting country, and i have 3 country in my database table's country column, in dropdown it should show the 3 country. And if I add one more value in country table, that also should come in dropdown.

I am new to MVC an this is found bit difficult. I am using mvc5.

Aucun commentaire:

Enregistrer un commentaire