DefaultControllerFactory::CreateController Method

Visual Studio 2010

Creates the specified controller by using the specified request context.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public:
virtual IController^ CreateController(
	RequestContext^ requestContext, 
	String^ controllerName
)

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.

Return Value

Type: System.Web.Mvc::IController
A reference to the controller.

Implements

IControllerFactory::CreateController(RequestContext, String)

ExceptionCondition
ArgumentNullException

The requestContext parameter is nullptr.

ArgumentException

The controllerName parameter is nullptr or empty.

Community Additions

ADD
Show: