如何进行分页。 [英] How Do I Do A Pagination.

查看:79
本文介绍了如何进行分页。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在列表中有20条记录,我将在视图中显示5个项目,当再次点击下一个按钮时,5个项目等等。任何想法。

I have 20 records in the list and i'm going to display 5 items in view and when click on next button again 5 items and so. any idea.

推荐答案

请通过以下链接实现相同的内容:



By PagedList

http://www.c-sharpcorner.com/UploadFile/rahul4_saxena/paging-and-sorting-in-mvc4-using-pagedlist/ [ ^ ]



按手动流程

http://stackoverflow.com/questions/446196/how-do-i-do-pagination-in-asp-net-mvc [ ^ ]
Please go through below links to implement the same:

By PagedList:
http://www.c-sharpcorner.com/UploadFile/rahul4_saxena/paging-and-sorting-in-mvc4-using-pagedlist/[^]

By Manual process:
http://stackoverflow.com/questions/446196/how-do-i-do-pagination-in-asp-net-mvc[^]


使用 PagedList [ ^ ]。请参阅这里 [ ^

如果您不想使用它,那么您可以使用 Skip() [< a href =http://www.dotnetperls.com/skiptarget =_ blanktitle =New Window> ^ ]& Take() [ ^ ]。



请使用Skip()& amp;拿() -

http:// www。 devcurry.com/2009/02/implementing-paging-in-generic-list.html [ ^ ]

http://blog.kurtschindler.net/paging-through-lists-with-linq/ [ ^ ]

http://geekswithblogs.net/BlackRabbitCoder/archive/2012/03/29/c.net-little-wonders -skip-and-take.aspx [ ^ ]



-KR
Use PagedList[^]. Refer the example from here[^].
And if you don't want to use that, then you can use Skip()[^] & Take()[^] for paging.

Refer this for paging using Skip() & Take()-
http://www.devcurry.com/2009/02/implementing-paging-in-generic-list.html[^]
http://blog.kurtschindler.net/paging-through-lists-with-linq/[^]
http://geekswithblogs.net/BlackRabbitCoder/archive/2012/03/29/c.net-little-wonders-skip-and-take.aspx[^]

-KR


这篇关于如何进行分页。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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