Using the fetch API

Catch the pager's clicks with one listener on the pager, cancel them with preventDefault, fetch the partial's HTML with fetch and response.text, and put it in the page with innerHTML. The links keep working when JavaScript doesn't run.

Updated

Cheat sheet: Using the fetch API
Category
JavaScript
Level
Journeyman
Tags
aspnet-core, Custom data attribute, Event Bubbling, Event Delegation, JavaScript