After a little bit of digging I found that asp-controller and asp-action attributes are called anchor tag helpers, and are part of the
Microsoft.AspNetCore.Mvc.TagHelpers namespace
Apparently it is an alternative to using Razor. I was able to resolve the issue by creating ‘_ViewImports.cshtml’ and adding the below into the file:
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
Once done that, anchor tag helpers were recognized and button start working as anticipated.