UrlHelper UrlHelper UrlHelper Constructors

Definition

Overloads

UrlHelper() UrlHelper()

Initializes a new instance of the UrlHelper class.

UrlHelper(RequestContext) UrlHelper(RequestContext)

Initializes a new instance of the UrlHelper class using the specified request context.

UrlHelper(RequestContext, RouteCollection) UrlHelper(RequestContext, RouteCollection)

Initializes a new instance of the UrlHelper class using the specified request context and route collection.

UrlHelper() UrlHelper()

Initializes a new instance of the UrlHelper class.

public UrlHelper ();
Public Sub New ()

UrlHelper(RequestContext) UrlHelper(RequestContext)

Initializes a new instance of the UrlHelper class using the specified request context.

public UrlHelper (System.Web.Routing.RequestContext requestContext);
new System.Web.Mvc.UrlHelper : System.Web.Routing.RequestContext -> System.Web.Mvc.UrlHelper

Parameters

requestContext
RequestContext RequestContext RequestContext

An object that contains information about the current request and about the route that it matched.

UrlHelper(RequestContext, RouteCollection) UrlHelper(RequestContext, RouteCollection)

Initializes a new instance of the UrlHelper class using the specified request context and route collection.

public UrlHelper (System.Web.Routing.RequestContext requestContext, System.Web.Routing.RouteCollection routeCollection);
new System.Web.Mvc.UrlHelper : System.Web.Routing.RequestContext * System.Web.Routing.RouteCollection -> System.Web.Mvc.UrlHelper

Parameters

requestContext
RequestContext RequestContext RequestContext

An object that contains information about the current request and about the route that it matched.

routeCollection
RouteCollection RouteCollection RouteCollection

A collection of routes.

Exceptions

ArgumentNullException ArgumentNullException ArgumentNullException

The requestContext or the routeCollection parameter is null.

Applies to