Dela via


UrlHelper.RouteUrl(UrlRouteContext) Method

Definition

Generates a URL with an absolute path, which contains the route name, route values, protocol to use, host name, and fragment specified by UrlRouteContext. Generates an absolute URL if Protocol and Host are non-null. See the remarks section for important security information.

public:
 virtual System::String ^ RouteUrl(Microsoft::AspNetCore::Mvc::Routing::UrlRouteContext ^ routeContext);
public:
 override System::String ^ RouteUrl(Microsoft::AspNetCore::Mvc::Routing::UrlRouteContext ^ routeContext);
public virtual string RouteUrl (Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext routeContext);
public override string RouteUrl (Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext routeContext);
public override string? RouteUrl (Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext routeContext);
abstract member RouteUrl : Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext -> string
override this.RouteUrl : Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext -> string
override this.RouteUrl : Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext -> string
Public Overridable Function RouteUrl (routeContext As UrlRouteContext) As String
Public Overrides Function RouteUrl (routeContext As UrlRouteContext) As String

Parameters

routeContext
UrlRouteContext

The context object for the generated URLs for a route.

Returns

The generated URL.

Implements

Applies to