Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IViewPageActivator.Create Method (ControllerContext, Type)

 

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)

object Create(
	ControllerContext controllerContext,
	Type type
)

Parameters

controllerContext
Type: System.Web.Mvc.ControllerContext

The controller context.

type
Type: System.Type

The type of the controller.

Return Value

Type: System.Object

The created view page.

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.

Return to top
Show:
© 2015 Microsoft