DefaultControllerFactory.CreateController Method (RequestContext, String)
Creates the specified controller by using the specified request context.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
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.
| Exception | Condition |
|---|---|
| ArgumentNullException | The requestContext parameter is null. |
| ArgumentException | The controllerName parameter is null or empty. |
Show: