O'Reilly logo

Bootstrap for ASP.NET MVC by Pieter van der Westhuizen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pagination

Pagination is used to divide content, usually lists, into separate pages. For example, when scaffolding a list view, the default scaffolding template generates a table that contains a row for each item in the collection you pass into the view. This is fine for small amounts of data, but if the list contains hundreds of items, your page will take a very long time to load. Ideally, we would like to split our list view into a manageable view that has five items per page. In the following screenshot, we've changed the Products page's table to use pagination:

Pagination

The aforementioned view is accomplished using the PagedList.Mvc NuGet package and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required