From 56838b589e240c35c2af44d14b95f835da8ab136 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Wed, 8 Sep 2021 22:09:48 +1000 Subject: [PATCH] 8.1.2 Refining the URL Scheme; Listing 8-4. Adding Category Information to the Pagination Links in the List.cshtml File --- SportsStore/SportsStore.WebUI/Views/Product/List.cshtml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SportsStore/SportsStore.WebUI/Views/Product/List.cshtml b/SportsStore/SportsStore.WebUI/Views/Product/List.cshtml index 0fa3a9e..de90a0e 100644 --- a/SportsStore/SportsStore.WebUI/Views/Product/List.cshtml +++ b/SportsStore/SportsStore.WebUI/Views/Product/List.cshtml @@ -10,6 +10,7 @@ @Html.Partial("ProductSummary", p) } -
- @Html.PageLinks(Model.PagingInfo, x => Url.Action("List", new { page = x})) +
+ @Html.PageLinks(Model.PagingInfo, x => Url.Action("List", + new { page = x, category = Model.CurrentCategory }))
\ No newline at end of file