How to get value of id in Url from Razor View in ASP.NET Core
Currently in ASP.NET Core 2.1 & 3.1 this works:
Context.Request.Query["id"]
in ASP.NET Core 3.1 & .NET 5 & .NET 6 this works for me:
@Context.Request.RouteValues["id"]
Something like that Context.GetRouteData().Values["id"];
?
Also http://www.blakepell.com/how-to-get-the-current-route-in-a-view-with-asp-net-5-mvc-6