共用方式為


RazorViewEngine.GetView(String, String, Boolean) 方法

定義

取得具有指定 viewPath 之 的檢視, executingFilePath 除非 已經是絕對的 ,否則 viewPath 為 。

public:
 virtual Microsoft::AspNetCore::Mvc::ViewEngines::ViewEngineResult ^ GetView(System::String ^ executingFilePath, System::String ^ viewPath, bool isMainPage);
public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult GetView (string executingFilePath, string viewPath, bool isMainPage);
public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult GetView (string? executingFilePath, string viewPath, bool isMainPage);
abstract member GetView : string * string * bool -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult
override this.GetView : string * string * bool -> Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult
Public Function GetView (executingFilePath As String, viewPath As String, isMainPage As Boolean) As ViewEngineResult

參數

executingFilePath
String

目前執行檢視的絕對路徑,如果有的話。

viewPath
String

檢視的路徑。

isMainPage
Boolean

判斷找到的頁面是否為動作的主頁面。

傳回

ViewEngineResult尋找檢視的 。

實作

適用於