PagedList.AspNetCore 10.0.8

dotnet add package PagedList.AspNetCore --version 10.0.8
                    
NuGet\Install-Package PagedList.AspNetCore -Version 10.0.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PagedList.AspNetCore" Version="10.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PagedList.AspNetCore" Version="10.0.8" />
                    
Directory.Packages.props
<PackageReference Include="PagedList.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PagedList.AspNetCore --version 10.0.8
                    
#r "nuget: PagedList.AspNetCore, 10.0.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PagedList.AspNetCore@10.0.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PagedList.AspNetCore&version=10.0.8
                    
Install as a Cake Addin
#tool nuget:?package=PagedList.AspNetCore&version=10.0.8
                    
Install as a Cake Tool

PagedList.AspNetCore

A Bootstrap-compatible pager tag helper for ASP.NET Core, targeting .NET 10+.

Why does this exist?

The original paging ecosystem for ASP.NET Core was split across two NuGet packages:

  • PagedList.Core — core paging types (IPagedList, StaticPagedList<T>, PagedList<T>, .ToPagedList())
  • PagedList.Core.Mvc — the Razor tag helper (<pager>) and render options

Both packages were abandoned after .NET 5 and are incompatible with modern .NET versions. This package replaces both with a single, maintained package that:

  • Targets .NET 10+
  • Ships all paging types and the MVC tag helper in one install
  • Requires no third-party dependencies beyond the ASP.NET Core framework
  • Drops the outdated "Core" naming (it's just .NET now)

Installation

dotnet add package PagedList.AspNetCore

That's it — no second package needed.

Usage

1. Register the tag helper

In Views/_ViewImports.cshtml:

@addTagHelper *, PagedList.AspNetCore

2. Create a paged list in your controller

using PagedList;

public IActionResult Index(int? page)
{
    var pageNumber = page ?? 1;
    var pageSize = 10;

    var items = _db.Products.OrderBy(p => p.Name);
    var pagedItems = items.ToPagedList(pageNumber, pageSize);

    return View(pagedItems);
}

If you are paging data yourself (e.g., from a search API or stored procedure):

using PagedList;

var pageOfItems = new StaticPagedList<Product>(itemsForThisPage, pageNumber, pageSize, totalCount);

3. Add the pager to your view

@using PagedList.AspNetCore
@model IPagedList<Product>

@foreach (var item in Model) { ... }

<pager list="@Model"
       asp-action="Index"
       asp-controller="Products" />

Default render options

The pager defaults to Bootstrap 4/5 page-numbers-plus-prev-next style. Pass an options attribute to change it:

<pager list="@Model"
       options="@PagedListRenderOptions.Bootstrap4Minimal"
       asp-action="Index"
       asp-controller="Products" />

Available presets:

Option Description
Bootstrap4Minimal Previous / Next only
Bootstrap4PageNumbersOnly Page numbers only
Bootstrap4PageNumbersPlusPrevAndNext Page numbers + Previous / Next (default)
Bootstrap4PageNumbersPlusFirstAndLast Page numbers + First / Last
Bootstrap4Full All navigation links

These work with both Bootstrap 4 and Bootstrap 5 — the pagination CSS class structure is identical between versions.

Custom options

var options = PagedListRenderOptions.Bootstrap4Full;
options.MaximumPageNumbersToDisplay = 5;

Passing route values

<pager list="@Model"
       asp-action="Index"
       asp-controller="Search"
       asp-route-query="@ViewBag.Query"
       asp-route-category="@ViewBag.Category" />

Upgrading from PagedList.Core + PagedList.Core.Mvc

Important: Upgrade your application to .NET 10+ and verify it builds and runs correctly before swapping this package in. Mixing a .NET 10 host with old .NET 5 packages will cause runtime failures that are unrelated to this library.

Once your app is running on .NET 10:

1. Remove the old packages

dotnet remove package PagedList.Core
dotnet remove package PagedList.Core.Mvc

2. Install this package

dotnet add package PagedList.AspNetCore

3. Update namespaces

Find and replace across your project:

Old New
using PagedList.Core.Mvc; using PagedList.AspNetCore;
using PagedList.Core; using PagedList;
@using PagedList.Core.Mvc @using PagedList.AspNetCore
@using PagedList.Core @using PagedList

4. Update the tag helper registration

In Views/_ViewImports.cshtml:

@* Remove this: *@
@addTagHelper *, PagedList.Core.Mvc

@* Add this: *@
@addTagHelper *, PagedList.AspNetCore

5. Build and test

Everything else — tag helper attributes (list, options, asp-action, asp-route-*, param-page-number), PagedListRenderOptions properties, IPagedList<T>, StaticPagedList<T> — is unchanged.

License

MIT — see original projects by Troy Goode and Hieu Le.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.8 95 5/15/2026