DefaultControllerFactory.CreateController Method
Creates the specified controller by using the specified request context.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
abstract CreateController : requestContext:RequestContext * controllerName:string -> IController override CreateController : requestContext:RequestContext * controllerName:string -> IController
Parameters
- requestContext
- Type: System.Web.Routing.RequestContext
The context of the HTTP request, which includes the HTTP context and route data.
- controllerName
- Type: System.String
The name of the controller.
Implements
IControllerFactory.CreateController(RequestContext, String)| Exception | Condition |
|---|---|
| ArgumentNullException | The requestContext parameter is a null reference (Nothing in Visual Basic). |
| ArgumentException | The controllerName parameter is a null reference (Nothing in Visual Basic) or empty. |
Show: