Hi,65841535
asp-handler can only assign page name:
<a asp-page="/Product" >Product</a>
If you use this code, then html will generate:
if you want to post to Add in Product, what is asp-route-handler? Is that your custom tag helper? Usually, you can use asp-page-handler like this:
And OnPost should be added to action name, for pagehandler to find:
public IActionResult OnPostAdd(int id)
{
//return RedirectToPage("/Privacy");
}
You can check more info about Razor Pages anchor tag helper in here:
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.