Do you know how easily I can bind the contents of a string array to a DropDownList in view for MVC Razor?
public static string[] AgeRagne = new string[] { "Sun", "Mon", "Tues", "Wed" };
UPDATE: Below code worked.
@Html.DropDownListFor(
model => model.Filter.AgeRange,
new SelectList(Extensions.AgeRange, Model.Filter.AgeRange),
new { @class = "search-dropdown", name = "ageRange" }
)
AgeRange
notAgeRagne
? =>=>.. string[] AgeRagne = ...
– Lymphoma