UrlRouteContext Class

Summary

Context object to be used for the URLs that [Microsoft.AspNet.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNet.Mvc.UrlRouteContext)](Microsoft.AspNet.Mvc.IUrlHelper.yml) generates.

Syntax

public class UrlRouteContext

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.UrlRouteContext

Properties

Fragment()

The fragment for the URLs that [Microsoft.AspNet.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNet.Mvc.UrlRouteContext)](Microsoft.AspNet.Mvc.IUrlHelper.yml) generates.

Return type:System.String
public string Fragment { get; set; }
Host()

The host name for the URLs that [Microsoft.AspNet.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNet.Mvc.UrlRouteContext)](Microsoft.AspNet.Mvc.IUrlHelper.yml) generates.

Return type:System.String
public string Host { get; set; }
Protocol()

The protocol for the URLs that [Microsoft.AspNet.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNet.Mvc.UrlRouteContext)](Microsoft.AspNet.Mvc.IUrlHelper.yml) generates such as “http” or “https”

Return type:System.String
public string Protocol { get; set; }
RouteName()

The name of the route that [Microsoft.AspNet.Mvc.IUrlHelper.RouteUrl(Microsoft.AspNet.Mvc.UrlRouteContext)](Microsoft.AspNet.Mvc.IUrlHelper.yml) uses to generate URLs.

Return type:System.String
public string RouteName { get; set; }
Values()

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

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