我正在尝试使用PageList.MVC NuGet package..plz帮助我在mvc中进行分页 [英] I am trying to do paging in mvc using PageList.MVC NuGet package..plz help me

查看:130
本文介绍了我正在尝试使用PageList.MVC NuGet package..plz帮助我在mvc中进行分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用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..

推荐答案

Quote:

传入字典的模型项是类型为'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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆