Udostępnij za pośrednictwem


UrlHelper Constructor (RequestContext, RouteCollection)

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

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Public Sub New ( _
    requestContext As RequestContext, _
    routeCollection As RouteCollection _
)
public UrlHelper(
    RequestContext requestContext,
    RouteCollection routeCollection
)
public:
UrlHelper(
    RequestContext^ requestContext, 
    RouteCollection^ routeCollection
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

The requestContext or the routeCollection parameter is null reference (Nothing in Visual Basic).

See Also

Reference

UrlHelper Class

UrlHelper Overload

System.Web.Mvc Namespace