This recipe is sort of a mix of routing and tomfoolery. While the routing aspect of this is pretty simple, the underlying bits that populate the URL can be a bit more complex. For that reason, we will cover both the routing aspect and a reusable control for managing pagination in any data set.
dependenciesfolder), so that we can create some data to play with.
Global.asax, so that we can add a new route to handle paging. We will create a route that will allow us to use our
HomeControllerwithout the customer knowing it, and that will expose a
pagevariable instead of the
idvariable. Also, instead of making the