Picflight
Picflight

Reputation: 3852

How do I do very large pagination in ASP.NET MVC?

I am following the NerdDinner MVC application as a guide to do my paging. What if my results are more than 1000 pages, I want to show perhaps the numbers 1 2 3 4 5 .. 10 on the bottom of my page and perhaps something like >> to move to the next set of 10 or 100 pages.

How can I do this in MVC?

Upvotes: 1

Views: 515

Answers (2)

Itniv
Itniv

Reputation: 122

Go for JQuery Datatables. that's the easiest way to solve pagination issues.Return the controller as JsonActionResult and supply it to datatables data. The remaning will be taken care by data tables. like pagination, search functionality at all. Check this https://datatables.net/examples/

Upvotes: 0

grenade
grenade

Reputation: 32179

I use the implementation demonstrated by Martijn Boland at: http://blogs.taiga.nl/martijn/2008/08/27/paging-with-aspnet-mvc/

Upvotes: 4

Related Questions