DropDownListFor does not select value if using int[] as value
- by Iceman
In my view
<%= Html.DropDownListFor( x => x.Countries[ i ], x.CountryList )%>
in my controller
public int[ ] Countries { get; set; }
public List<SelectListItem> CountryList { get; set; }
When the forms gets posted there is no problem, the dropdown is populated and the values the user selects are posted. But when I try to load the form with already assigned values to the Countries[ ] it does not get selected.