我正在尝试使用PageList.MVC NuGet package..plz帮助我在mvc中进行分页 [英] I am trying to do paging in mvc using PageList.MVC NuGet package..plz help me
问题描述
我正在尝试使用PageList.MVC NuGet包在mvc中进行分页..
但它会抛出运行时错误,如下所示
传入字典的模型项的类型为'PagedList.PagedList`1 [MvcPaging.Product]',但此字典需要类型为'PagedList.IPagedList`1 [MvcPaging]的模型项。 Models.ProductDetails]'
我没有得到解决方案.. plz帮我解决为什么会出现这个问题..
谢谢提前..
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..
推荐答案
传入字典的模型项是类型为'PagedList.PagedList`1 [MvcPaging.Product]',但此字典需要类型为'PagedList.IPagedList`1 [MvcPaging.Models.ProductDetails]'的模型项''
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]'"
这个问题是自解释的。你传递的是错的.PagedList需要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.
这篇关于我正在尝试使用PageList.MVC NuGet package..plz帮助我在mvc中进行分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!