DefaultControllerFactory.GetControllerInstance Method (System.Web.Mvc)

Switch View :
ScriptFree
.NET Framework Class Library
DefaultControllerFactory.GetControllerInstance Method

Retrieves the controller instance by using the specified type.

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

Visual Basic (Declaration)
Protected Friend Overridable Function GetControllerInstance ( _
	controllerType As Type _
) As IController
Visual Basic (Usage)
Dim controllerType As Type
Dim returnValue As IController

returnValue = Me.GetControllerInstance(controllerType)
C#
protected internal virtual IController GetControllerInstance(
	Type controllerType
)
Visual C++
protected public:
virtual IController^ GetControllerInstance(
	Type^ controllerType
)

Parameters

controllerType
Type: System.Type
The type of the controller.

Return Value

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

Reference