While binding dropdown in MVC, I always get this error: There is no ViewData item of type \'IEnumerable.
If you were using DropDownListFor like this:
@Html.DropDownListFor(m => m.SelectedItemId, Model.MySelectList)
where MySelectList in the model was a property of type SelectList, this error could be thrown if the property was null.
Avoid this by simple initializing it in constructor, like this:
public MyModel()
{
MySelectList = new SelectList(new List()); // empty list of anything...
}
I know it's not the OP's case, but this might help someone like me which had the same error due to this.