Easiest way to specify the selected option to a dropdown list in ASP.NET MVC
- by sdr
I have a list of options (IEnumerable< SelectListItem ) in my model that I want to use in multiple dropdowns in my view. But each of these dropdowns could have a different selected option.
Is there an easy way to simply specfiy which should be selected if using the Html.DropDownList helper?
At this point, the only way I can see is to…