Generating links inside a .NET Core Tag Helper

added by DotNetKicks
5/3/2021 4:34:09 PM

306 Views

Previously when generating links inside any non view code I'd always try and get hold of an instance of IUrlHelper, but I've found a simpler way that has been available since .NET Core 2.2. LinkGenerator can be injected into a tag helper or any class.


0 comments