My ViewModel is as follows:
public class ClassificationCalculatorIndexViewModel
{
public bool PlacementYear { get; set; }
public int[] Credit { get; set; } // List of Integers
public int selectedCredit { get; set; } // Somewhere to store selected integer
public List<YearOfStudy> StudyYear { get; set; }
}
I am struggling to bind the Integer array to a DropDownList helper object in my Razor view, I am doing the following:
@Html.DropDownListFor(Model.selectedCredit, Model.Credit)
But getting errors, I tried Googling, but found nothing of the same nature :(