diff --git a/src/BlazorWebFormsComponents/BaseWebFormsComponent.cs b/src/BlazorWebFormsComponents/BaseWebFormsComponent.cs
index 920d225..a54f646 100644
--- a/src/BlazorWebFormsComponents/BaseWebFormsComponent.cs
+++ b/src/BlazorWebFormsComponents/BaseWebFormsComponent.cs
@@ -1,5 +1,7 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Routing;
using Microsoft.JSInterop;
using System;
using System.Collections.Generic;
@@ -44,6 +46,12 @@ void ParentWrappingBuildRenderTree(RenderTreeBuilder builder)
#region Obsolete Attributes / Properties
+ [Inject]
+ public LinkGenerator LinkGenerator { get; set; }
+
+ [Inject]
+ public IHttpContextAccessor HttpContextAccessor { get; set; }
+
///
/// 🚨🚨 Use @ref instead of ID 🚨🚨
///
diff --git a/src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj b/src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj
index 42ce7e7..40a9888 100644
--- a/src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj
+++ b/src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj
@@ -26,6 +26,7 @@
+
diff --git a/src/BlazorWebFormsComponents/Extensions/GetRouteUrlHelper.cs b/src/BlazorWebFormsComponents/Extensions/GetRouteUrlHelper.cs
new file mode 100644
index 0000000..19e5a1f
--- /dev/null
+++ b/src/BlazorWebFormsComponents/Extensions/GetRouteUrlHelper.cs
@@ -0,0 +1,19 @@
+using Microsoft.AspNetCore.Routing;
+
+namespace BlazorWebFormsComponents.Extensions
+{
+ public static class GetRouteUrlHelper
+ {
+ public static string GetRouteUrl(this BaseWebFormsComponent component, object routeParameters)
+ => component.LinkGenerator.GetPathByRouteValues(component.HttpContextAccessor.HttpContext, null, routeParameters);
+
+ public static string GetRouteUrl(this BaseWebFormsComponent component, string routeName, object routeParameters)
+ => component.LinkGenerator.GetPathByRouteValues(component.HttpContextAccessor.HttpContext, routeName, routeParameters);
+
+ public static string GetRouteUrl(this BaseWebFormsComponent component, RouteValueDictionary routeParameters)
+ => null;
+
+ public static string GetRouteUrl(this BaseWebFormsComponent component, string routeName, RouteValueDictionary routeParameters)
+ => null;
+ }
+}