'Link Tag is not working: Unclickable link

I have this link below:

<a asp-page="./CreateNew">CreateNewLink</a>

Why is CreateNewLink not clickable after running the code?



Solution 1:[1]

H Make Sure That you declare usage of taghelpers in _ViewImports.cshtml

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

And then make sure you have the address of page right because the asp-page will not render a href for a tag if the address is not valid

if this doesn't help, take a look at MS DOC

Solution 2:[2]

When I try to use your code it breaks my application, changing to:

<a asp-page="/CreateNew">CreateNewLink</a>

Works and shows a clickable link: enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Hussein Beygi
Solution 2 elefint