DefaultControllerFactory::GetControllerInstance Method
Visual Studio 2010
Retrieves the controller instance for the specified request context and controller type.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
protected public: virtual IController^ GetControllerInstance( RequestContext^ requestContext, Type^ controllerType )
Parameters
- requestContext
- Type: System.Web.Routing::RequestContext
The context of the HTTP request, which includes the HTTP context and route data.
- controllerType
- Type: System::Type
The type of the controller.
| Exception | Condition |
|---|---|
| HttpException | controllerType is nullptr. |
| ArgumentException | controllerType cannot be assigned. |
| InvalidOperationException | An instance of controllerType cannot be created. |
Community Additions
ADD
Show: