1

I am currently using MVC4 in VS 2012 with MySql to built a website. I have issue when I try to display my data and get this error :

The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[System.String]', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[MyMvc4SalesStatistics.Models.users_internal_group_membership]'. 

Screenshot: Image

4

1 回答 1

0

its because in your view type is System.Web.Mvc.View<IEnumerable<User-Internal-Group-MemberShip>> but you return some other data in your controller

return View(UserInternalGroupMemberShip.);//Must return the your model object for view ,

But I am not sure .

Please see this discussion

and see this

于 2013-05-30T16:19:42.013 回答