Thursday, May 26, 2011

The ViewData item that has the key 'XXX' is of type 'System.Int32' but must be of type 'IEnumerable'.

If you're using ASP.Net MVC and you get this message using a DropDownList...

... then check whether the IEnumerable you think you are passing in actually exists in your ViewBag/ViewData

No comments:

Post a Comment