Table of Contents

Interface IViewEngine

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

Defines the methods that are required for a view engine.

public interface IViewEngine

Methods

FindPartialView(ControllerContext, string, bool)

Finds the specified partial view by using the specified controller context.

ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache)

Parameters

controllerContext ControllerContext

The controller context.

partialViewName string

The name of the partial view.

useCache bool

true to specify that the view engine returns the cached view, if a cached view exists; otherwise, false.

Returns

ViewEngineResult

The partial view.

FindView(ControllerContext, string, string, bool)

Finds the specified view by using the specified controller context.

ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)

Parameters

controllerContext ControllerContext

The controller context.

viewName string

The name of the view.

masterName string

The name of the master.

useCache bool

true to specify that the view engine returns the cached view, if a cached view exists; otherwise, false.

Returns

ViewEngineResult

The page view.

ReleaseView(ControllerContext, IView)

Releases the specified view by using the specified controller context.

void ReleaseView(ControllerContext controllerContext, IView view)

Parameters

controllerContext ControllerContext

The controller context.

view IView

The view.