VirtualPathProviderViewEngine.FindView Method

Definition

Finds the specified view by using the specified controller context and master view name.

public virtual System.Web.Mvc.ViewEngineResult FindView (System.Web.Mvc.ControllerContext controllerContext, string viewName, string masterName, bool useCache);
abstract member FindView : System.Web.Mvc.ControllerContext * string * string * bool -> System.Web.Mvc.ViewEngineResult
override this.FindView : System.Web.Mvc.ControllerContext * string * string * bool -> System.Web.Mvc.ViewEngineResult
Public Overridable Function FindView (controllerContext As ControllerContext, viewName As String, masterName As String, useCache As Boolean) As ViewEngineResult

Parameters

controllerContext
ControllerContext

The controller context.

viewName
String

The name of the view.

masterName
String

The name of the master view.

useCache
Boolean

true to use the cached view.

Returns

The page view.

Implements

Exceptions

The controllerContext parameter is null (Nothing in Visual Basic).

The viewName parameter is null or empty.

Applies to