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
)
new : 
        controllerContext:ControllerContext * 
        viewPath:string * 
        layoutPath:string * 
        runViewStartPages:bool * 
        viewStartFileExtensions:IEnumerable<string> -> RazorView
public function RazorView(
    controllerContext : ControllerContext, 
    viewPath : String, 
    layoutPath : String, 
    runViewStartPages : boolean, 
    viewStartFileExtensions : IEnumerable<String>
)

Parameters

  • runViewStartPages
    Type: System.Boolean

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

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.

See Also

Reference

RazorView Class

RazorView Overload

System.Web.Mvc Namespace