Click here to Skip to main content
15,904,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to do paging in mvc using PageList.MVC NuGet package..
But it throws runtime error as below


"The model item passed into the dictionary is of type 'PagedList.PagedList`1[MvcPaging.Product]', but this dictionary requires a model item of type 'PagedList.IPagedList`1[MvcPaging.Models.ProductDetails]'"

I didn't get the solution.. plz help me why this problem occurs..
thanks in advance..
Posted

1 solution

Quote:
The model item passed into the dictionary is of type 'PagedList.PagedList`1[MvcPaging.Product]', but this dictionary requires a model item of type 'PagedList.IPagedList`1[MvcPaging.Models.ProductDetails]'"

This issue is self explanatory. You are passing is wrong. The PagedList expects MvcPaging.Models.ProductDetails, please change the Model, I am sure it would work out.
Post back your queries if any.
Thanks.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900