Table of Contents

Class RazorViewEngine

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Represents a view engine that is used to render a Web page that uses the ASP.NET Razor syntax.

public class RazorViewEngine : BuildManagerViewEngine, IViewEngine
Inheritance
RazorViewEngine
Implements
Inherited Members

Constructors

RazorViewEngine()

Initializes a new instance of the RazorViewEngine class.

public RazorViewEngine()

RazorViewEngine(IViewPageActivator)

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

public RazorViewEngine(IViewPageActivator viewPageActivator)

Parameters

viewPageActivator IViewPageActivator

The view page activator.

Methods

CreatePartialView(ControllerContext, string)

Creates a partial view using the specified controller context and partial path.

protected override IView CreatePartialView(ControllerContext controllerContext, string partialPath)

Parameters

controllerContext ControllerContext

The controller context.

partialPath string

The path to the partial view.

Returns

IView

The partial view.

CreateView(ControllerContext, string, string)

Creates a view by using the specified controller context and the paths of the view and master view.

protected override IView CreateView(ControllerContext controllerContext, string viewPath, string masterPath)

Parameters

controllerContext ControllerContext

The controller context.

viewPath string

The path to the view.

masterPath string

The path to the master view.

Returns

IView

The view.