Share via


ViewEngineCollection.FindView(ControllerContext, String, String) Method

Definition

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

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

Parameters

controllerContext
ControllerContext

The controller context.

viewName
String

The name of the view.

masterName
String

The name of the master view.

Returns

The view.

Exceptions

The controllerContext parameter is null.

The partialViewName parameter is null or empty.

Applies to