Share via


IViewEngine.FindView(ActionContext, String, Boolean) Method

Definition

Finds the view with the given viewName using view locations and information from the context.

public:
 Microsoft::AspNetCore::Mvc::ViewEngines::ViewEngineResult ^ FindView(Microsoft::AspNetCore::Mvc::ActionContext ^ context, System::String ^ viewName, bool isMainPage);
public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult FindView (Microsoft.AspNetCore.Mvc.ActionContext context, string viewName, bool isMainPage);
abstract member FindView : Microsoft.AspNetCore.Mvc.ActionContext * string * bool -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult
Public Function FindView (context As ActionContext, viewName As String, isMainPage As Boolean) As ViewEngineResult

Parameters

viewName
String

The name or path of the view that is rendered to the response.

isMainPage
Boolean

Determines if the page being found is the main page for an action.

Returns

The ViewEngineResult of locating the view.

Remarks

Use GetView(String, String, Boolean) when the absolute or relative path of the view is known.

Applies to