ControllerContext Constructors

Definition

Overloads

ControllerContext()

Initializes a new instance of the ControllerContext class.

ControllerContext(ControllerContext)

Initializes a new instance of the ControllerContext class by using the specified controller context.

ControllerContext(RequestContext, ControllerBase)

Initializes a new instance of the ControllerContext class by using the specified request context and controller.

ControllerContext(HttpContextBase, RouteData, ControllerBase)

Initializes a new instance of the ControllerContext class by using the specified HTTP context, URL route data, and controller.

ControllerContext()

Initializes a new instance of the ControllerContext class.

public ControllerContext ();
Public Sub New ()

ControllerContext(ControllerContext)

Initializes a new instance of the ControllerContext class by using the specified controller context.

protected ControllerContext (System.Web.Mvc.ControllerContext controllerContext);
new System.Web.Mvc.ControllerContext : System.Web.Mvc.ControllerContext -> System.Web.Mvc.ControllerContext
Protected Sub New (controllerContext As ControllerContext)

Parameters

controllerContext
ControllerContext

The controller context.

Exceptions

The controllerContext parameter is null.

ControllerContext(RequestContext, ControllerBase)

Initializes a new instance of the ControllerContext class by using the specified request context and controller.

public ControllerContext (System.Web.Routing.RequestContext requestContext, System.Web.Mvc.ControllerBase controller);
new System.Web.Mvc.ControllerContext : System.Web.Routing.RequestContext * System.Web.Mvc.ControllerBase -> System.Web.Mvc.ControllerContext
Public Sub New (requestContext As RequestContext, controller As ControllerBase)

Parameters

requestContext
RequestContext

The request context.

controller
ControllerBase

The controller.

Exceptions

One or both parameters are null.

ControllerContext(HttpContextBase, RouteData, ControllerBase)

Initializes a new instance of the ControllerContext class by using the specified HTTP context, URL route data, and controller.

public ControllerContext (System.Web.HttpContextBase httpContext, System.Web.Routing.RouteData routeData, System.Web.Mvc.ControllerBase controller);
new System.Web.Mvc.ControllerContext : System.Web.HttpContextBase * System.Web.Routing.RouteData * System.Web.Mvc.ControllerBase -> System.Web.Mvc.ControllerContext
Public Sub New (httpContext As HttpContextBase, routeData As RouteData, controller As ControllerBase)

Parameters

httpContext
HttpContextBase

The HTTP context.

routeData
RouteData

The route data.

controller
ControllerBase

The controller.

Applies to