IViewPageActivator.Create Method
Provides fine-grained control over how view pages are created using dependency injection.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
'Declaration Function Create ( _ controllerContext As ControllerContext, _ type As Type _ ) As Object 'Usage Dim instance As IViewPageActivator Dim controllerContext As ControllerContext Dim type As Type Dim returnValue As Object returnValue = instance.Create(controllerContext, _ type)
Parameters
- controllerContext
- Type: System.Web.Mvc.ControllerContext
The controller context.
- type
- Type: System.Type
The type of the controller.
The WebFormView and RazorView classes have constructor method overloads that implement this interface in order to support dependency injection. Creating a WebFormView or RazorView class that implements the IViewPageActivator interface lets you control how ViewPage, ViewUserControl, and WebViewPage objects are instantiated.
Show: