RazorViewEngineOptions.ViewLocationFormats 屬性

定義

取得將搜尋檢視的位置 RazorViewEngine

public:
 property System::Collections::Generic::IList<System::String ^> ^ ViewLocationFormats { System::Collections::Generic::IList<System::String ^> ^ get(); };
public System.Collections.Generic.IList<string> ViewLocationFormats { get; }
member this.ViewLocationFormats : System.Collections.Generic.IList<string>
Public ReadOnly Property ViewLocationFormats As IList(Of String)

屬性值

備註

從不屬於區域的控制器傳回的檢視位置。 位置是格式字串, (請參閱 https://msdn.microsoft.com/en-us/library/txafckwd.aspx 可能包含下列格式專案的) :

  • {0} - 動作名稱
  • {1} - 控制器名稱

這些位置的值會在區分大小寫的檔案系統上區分大小寫。 例如,動作的 TestHomeController 檢視應該位於 /Views/Home/Test.cshtml 。 不會探索這類 /views/home/test.cshtml 位置。

適用於