I'm developing a .Net Core 5.0 webap and use links like this in a shared view:
<a class="dropdown-item" asp-controller="company" asp-action="service">Service</a>
This gives me a href like this (which is correct):
http://examle.com/company/service
The problem arise when I'm on a spesific page like this:
http://examle.com/company/service/5
The href changes accordingly, I get .../service/5 instead of just .../service.
How do I prevent the link to change without hardcoding the href in my view?