<a asp-page="\Products\Details" asp-route-ID="@products.Product_ID"
class="btn btn-primary m-1">View</a>
route ID not working here in this code .Please suggest. This also doesn't working for asp-route- tag
View
Try this code:
<a asp-page="../Products/Details" asp-route-ID="@products.Product_ID"
class="btn btn-primary m-1">View</a>
In your /Products/Details
get action:
public IActionResult OnGet(int ID)
{
return Page();
}