UrlHelper Constructors

Definition

Overloads

UrlHelper()

Initializes a new instance of the UrlHelper class.

UrlHelper(RequestContext)

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

UrlHelper(RequestContext, RouteCollection)

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

UrlHelper()

Initializes a new instance of the UrlHelper class.

public UrlHelper ();
Public Sub New ()

Applies to

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
Public Sub New (requestContext As RequestContext)

Parameters

requestContext
RequestContext

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

Applies to

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
Public Sub New (requestContext As RequestContext, routeCollection As RouteCollection)

Parameters

requestContext
RequestContext

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

routeCollection
RouteCollection

A collection of routes.

Exceptions

ArgumentNullException

The requestContext or the routeCollection parameter is null.

Applies to