RazorView Constructor (ControllerContext, String, String, Boolean, IEnumerable(Of String), IViewPageActivator)

Initializes a new instance of the RazorView class using the view page activator.

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

'Declaration
Public Sub New ( _
	controllerContext As ControllerContext, _
	viewPath As String, _
	layoutPath As String, _
	runViewStartPages As Boolean, _
	viewStartFileExtensions As IEnumerable(Of String), _
	viewPageActivator As IViewPageActivator _
)
'Usage
Dim controllerContext As ControllerContext 
Dim viewPath As String 
Dim layoutPath As String 
Dim runViewStartPages As Boolean 
Dim viewStartFileExtensions As IEnumerable(Of String)
Dim viewPageActivator As IViewPageActivator 

Dim instance As New RazorView(controllerContext, _
	viewPath, layoutPath, runViewStartPages, _
	viewStartFileExtensions, viewPageActivator)

Parameters

controllerContext
Type: System.Web.Mvc.ControllerContext

The controller context.

viewPath
Type: System.String

The view path.

layoutPath
Type: System.String

The layout or master page.

runViewStartPages
Type: System.Boolean

A value that indicates whether view start files should be executed before the view.

viewStartFileExtensions
Type: System.Collections.Generic.IEnumerable(Of String)

The set of extensions that will be used when looking up view start files.

viewPageActivator
Type: System.Web.Mvc.IViewPageActivator

The view page activator.

View start files are layout files and master-page files. For example, view start files can include _ViewStart.cshtml in a C# ASP.NET MVC project and _ViewStart.vbhtml in a Visual Basic ASP.NET MVC project.

Show: