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

Initializes a new instance of the RazorView class.

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) _
)
'Usage
Dim controllerContext As ControllerContext 
Dim viewPath As String 
Dim layoutPath As String 
Dim runViewStartPages As Boolean 
Dim viewStartFileExtensions As IEnumerable(Of String)

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

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.

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: