Partager via


ViewEngineCollection.FindView Method

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

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Public Overridable Function FindView ( _
    controllerContext As ControllerContext, _
    viewName As String, _
    masterName As String _
) As ViewEngineResult
public virtual ViewEngineResult FindView(
    ControllerContext controllerContext,
    string viewName,
    string masterName
)
public:
virtual ViewEngineResult^ FindView(
    ControllerContext^ controllerContext, 
    String^ viewName, 
    String^ masterName
)

Parameters

Return Value

Type: System.Web.Mvc.ViewEngineResult
The view.

Exceptions

Exception Condition
ArgumentNullException

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

ArgumentException

The viewName parameter is null reference (Nothing in Visual Basic) or empty.

See Also

Reference

ViewEngineCollection Class

System.Web.Mvc Namespace