darrel-oneil / PaginationTagHelper

A paging tag helper for ASP.NET Core 2.0 with ajax support and Bootstrap 4.0 generated markup.
MIT License
9 stars 4 forks source link

Not working in Razor Pages #2

Open CybrZr00 opened 5 years ago

CybrZr00 commented 5 years ago

This is a great help, I was about to dive in and start making my own! Thank you for taking the time to share!

Sadly "page" in a route is already reserved by razor pages. (Fine for MVC)

This is a quick fix, I simply edited PaginatorTagHelper.cs by adding:

    // Allows users to change the "page" verb, which ensures compatability with razor pages
    [HtmlAttributeName("page-link-verb")]
    public string PageVerb { get; set; } = "page";

and replacing all uses of the string "page" (except for the aria property), with PageVerb.

darrel-oneil commented 5 years ago

Hi Mark,

Thanks for making me aware of this issue. I will look to fix this as soon as I can.

Glad you found the paging tag helper useful.