In your view model you could have a Months
property:
public IEnumerable<SelectListItem> Months
{
get
{
return DateTimeFormatInfo
.InvariantInfo
.MonthNames
.Select((monthName, index) => new SelectListItem
{
Value = (index + 1).ToString(),
Text = monthName
});
}
}
which could be directly bound to a DropDownListFor
:
<%= Html.DropDownListFor(x => x.SelectedMonth, Model.Months) %>