conferza
conferza
CC#
Created by conferza on 2/14/2025 in #help
Tag helper not working properly
i've been debugging this for a few hours now, i don't understand what's wrong. it's working in my other project... so the problem is a tag helper that doesn't show up on the page. this is what html it results in:
<div page-model="WebApp.ViewModels.PagingInfo" page-action="Index" page-classes-enabled="true" page-class="btn" page-class-normal="btn-outline-dark" page-class-selected="btn-primary" class="btn-group pull-right m-1"></div>
<div page-model="WebApp.ViewModels.PagingInfo" page-action="Index" page-classes-enabled="true" page-class="btn" page-class-normal="btn-outline-dark" page-class-selected="btn-primary" class="btn-group pull-right m-1"></div>
this is what it looks like in code (i checked the viewmodel that i'm passing here, it's not null, the data gets correctly populated):
<div page-model="@Model.PagingInfo" page-action="Index" page-classes-enabled="true"
page-class="btn" page-class-normal="btn-outline-dark"
page-class-selected="btn-primary" class="btn-group pull-right m-1"></div>
<div page-model="@Model.PagingInfo" page-action="Index" page-classes-enabled="true"
page-class="btn" page-class-normal="btn-outline-dark"
page-class-selected="btn-primary" class="btn-group pull-right m-1"></div>
PagingInfo contains a few properties related to pagination. the viewmodel contains it along with a collection of objects that need to be displayed on the page (which do get displayed properly) imports are in place, pagination using a query string in the search bar works properly, but no buttons are displayed below!!! ugh. this is what it's supposed to look like (example from my other project. don't mind the link, it uses conventional routing instead of query string that i used for simplicity):
<div class="btn-group pull-right m-1">
<a class="btn btn-primary" href="/products/page1">1</a>
<a class="btn btn-outline-dark" href="/products/page2">2</a>
</div>
<div class="btn-group pull-right m-1">
<a class="btn btn-primary" href="/products/page1">1</a>
<a class="btn btn-outline-dark" href="/products/page2">2</a>
</div>
i'll send the PageLinkTagHelper.cs in a message below
10 replies