ControllerContext Constructor
Initializes a new instance of the ControllerContext class.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() | 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(HttpContextBase, RouteData, ControllerBase) | Initializes a new instance of the ControllerContext class by using the specified HTTP context, URL route data, and controller. |
![]() | ControllerContext(RequestContext, ControllerBase) | Initializes a new instance of the ControllerContext class by using the specified request context and controller. |
ControllerContext Constructor ()
Initializes a new instance of the ControllerContext class.
ControllerContext Constructor (ControllerContext)
Initializes a new instance of the ControllerContext class by using the specified controller context.
Parameters
- controllerContext
-
Type:
System.Web.Mvc.ControllerContext
The controller context.
| Exception | Condition |
|---|---|
| ArgumentNullException | The controllerContext parameter is null. |
ControllerContext Constructor (HttpContextBase, RouteData, ControllerBase)
Initializes a new instance of the ControllerContext class by using the specified HTTP context, URL route data, and controller.
new :
httpContext:HttpContextBase *
routeData:RouteData *
controller:ControllerBase -> ControllerContext
Parameters
- httpContext
-
Type:
System.Web.HttpContextBase
The HTTP context.
- routeData
-
Type:
System.Web.Routing.RouteData
The route data.
- controller
-
Type:
System.Web.Mvc.ControllerBase
The controller.
ControllerContext Constructor (RequestContext, ControllerBase)
Initializes a new instance of the ControllerContext class by using the specified request context and controller.
Parameters
- requestContext
-
Type:
System.Web.Routing.RequestContext
The request context.
- controller
-
Type:
System.Web.Mvc.ControllerBase
The controller.
| Exception | Condition |
|---|---|
| ArgumentNullException | One or both parameters are null. |

