Do you know how easy it is for me to associate the contents of a string array with a DropDownList to view MVC Razor?
public static string[] AgeRagne = new string[] { "Sun", "Mon", "Tues", "Wed" };
UPDATE: Below is the code.
@Html.DropDownListFor( model => model.Filter.AgeRange, new SelectList(Extensions.AgeRange, Model.Filter.AgeRange), new { @class = "search-dropdown", name = "ageRange" } )
source share