通过采取和跳过ASP.NET MVC分页 [英] ASP.NET MVC Pagination using Take and Skip
问题描述
编辑:这个问题已经取得了这个问题,尽可能多地code冗余使用存储库来仅使用控制器改变:的 MVC分页帮助
This question has been made redundant by this question as much of the code changed from using a repository to using just the controller: MVC Pagination Help
推荐答案
卡梅伦
我可以指出你是我创建了一个凌晨前阵子有人在这里SO(使用IPagedList接口)的例子。它可以作为一个的HtmlHelper但可能会更多特色比你之后。这是继SO分页,即模式:
I can point you to an example that I created a wee while back for someone here on SO (using an IPagedList interface). it works as a htmlhelper but may be more featured than you're after. it follows the pattern here on SO for paging, i.e.:
反正,你可以从这里把它捡起来,并围绕有一捅吧:
anyway, you can pick it up from here and have a poke around with it:
http://www.gatehousemusic.com/downloads/MvcApplication2.zip
另外,我根据你的对象结构和简化的页面替代解决方案的需要:
also, my alternative solution based on your object structure and simplified paging needs:
http://www.gatehousemusic.com/downloads/PagingSimple.zip
这篇关于通过采取和跳过ASP.NET MVC分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!