Startup.cs
add this service
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
@inject Microsoft.AspNetCore.Http.IHttpContextAccessor HttpContextAccessor
Code
@inject Microsoft.AspNetCore.Http.IHttpContextAccessor HttpContextAccessor
@{
var id = HttpContextAccessor.HttpContext.Request.RouteValues["id"];
if (id != null)
{
// parameter exist in your URL
}
string navigation = await Navigation.WebNavigation(activeTab);
}