RazorView Constructor (ControllerContext, String, String, Boolean, IEnumerable<String>)
Initializes a new instance of the RazorView class.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Syntax
'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)
public RazorView(
ControllerContext controllerContext,
string viewPath,
string layoutPath,
bool runViewStartPages,
IEnumerable<string> viewStartFileExtensions
)
public:
RazorView(
ControllerContext^ controllerContext,
String^ viewPath,
String^ layoutPath,
bool runViewStartPages,
IEnumerable<String^>^ viewStartFileExtensions
)
public function RazorView(
controllerContext : ControllerContext,
viewPath : String,
layoutPath : String,
runViewStartPages : boolean,
viewStartFileExtensions : IEnumerable<String>
)
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<String>
The set of extensions that will be used when looking up view start files.
Remarks
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.