Table of Contents

Class UrlHelper

Namespace
System.Web.Http.Routing
Assembly
System.Web.Http.dll

No content here will be updated; please do not add material here.

public class UrlHelper
Inheritance
UrlHelper
Inherited Members

Constructors

UrlHelper(HttpRequestMessage)

Initializes a new instance of the UrlHelper class.

public UrlHelper(HttpRequestMessage request)

Parameters

request HttpRequestMessage

The HTTP request for this instance.

Properties

Request

Gets or sets the HttpRequestMessage of the current UrlHelper instance.

public HttpRequestMessage Request { get; set; }

Property Value

HttpRequestMessage

The HttpRequestMessage of the current instance.

Methods

Returns a link for the specified route.

public string Link(string routeName, IDictionary<string, object> routeValues)

Parameters

routeName string

The name of the route.

routeValues IDictionary<string, object>

An object that contains the parameters for a route.

Returns

string

A link for the specified route.

Returns a link for the specified route.

public string Link(string routeName, object routeValues)

Parameters

routeName string

The name of the route.

routeValues object

A route value.

Returns

string

A link for the specified route.

Route(string, IDictionary<string, object>)

Returns the route for the UrlHelper.

public string Route(string routeName, IDictionary<string, object> routeValues)

Parameters

routeName string

The name of the route.

routeValues IDictionary<string, object>

A list of route values.

Returns

string

The route for the UrlHelper.

Route(string, object)

Returns the route for the UrlHelper.

public string Route(string routeName, object routeValues)

Parameters

routeName string

The name of the route.

routeValues object

The route values.

Returns

string

The route for the UrlHelper.