Skip to content Skip to sidebar Skip to footer

Mvc Dropdownlistfor

I am new using MVC approach. How to using the DropDownListfor in the MVC? I need get the list from my master table and show the option into the Business Premise in the Business Pro

Solution 1:

Try this in your view

@Html.DropDownListFor(m => m.Entity, new Project.Models.My_Class().My_Method, new { @class = "form-control" })

You cant get data from your DropDownListFor.

In the My_Method , You can use SelectList

Post a Comment for "Mvc Dropdownlistfor"