UrlRouteContext Class

Context object to be used for the URLs that Microsoft.AspNetCore.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext) generates.

Namespace
Microsoft.AspNetCore.Mvc.Routing
Assemblies
  • Microsoft.AspNetCore.Mvc.Abstractions

Syntax

public class UrlRouteContext
class Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext

Properties

Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext.Fragment

The fragment for the URLs that Microsoft.AspNetCore.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext) generates.

Return type:System.String
public string Fragment { get; set; }
Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext.Host

The host name for the URLs that Microsoft.AspNetCore.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext) generates.

Return type:System.String
public string Host { get; set; }
Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext.Protocol

The protocol for the URLs that Microsoft.AspNetCore.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext) generates such as “http” or “https”

Return type:System.String
public string Protocol { get; set; }
Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext.RouteName

The name of the route that Microsoft.AspNetCore.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext) uses to generate URLs.

Return type:System.String
public string RouteName { get; set; }
Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext.Values

The object that contains the route values for the generated URLs.

Return type:System.Object
public object Values { get; set; }