RazorView Constructor
Initializes a new instance of the RazorView class.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() | RazorView(ControllerContext, String, String, Boolean, IEnumerable(Of String)) | Initializes a new instance of the RazorView class. |
![]() | RazorView(ControllerContext, String, String, Boolean, IEnumerable(Of String), IViewPageActivator) | Initializes a new instance of the RazorView class using the view page activator. |
RazorView Constructor (ControllerContext, String, String, Boolean, IEnumerable(Of String))
Initializes a new instance of the RazorView class.
Public Sub New ( controllerContext As ControllerContext, viewPath As String, layoutPath As String, runViewStartPages As Boolean, viewStartFileExtensions As IEnumerable(Of 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(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.
RazorView Constructor (ControllerContext, String, String, Boolean, IEnumerable(Of String), IViewPageActivator)
Initializes a new instance of the RazorView class using the view page activator.
Public Sub New ( controllerContext As ControllerContext, viewPath As String, layoutPath As String, runViewStartPages As Boolean, viewStartFileExtensions As IEnumerable(Of String), viewPageActivator As IViewPageActivator )
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.
