Share via


RazorViewEngineOptions.AreaViewLocationFormats 屬性

定義

取得將在區域內搜尋檢視的位置 RazorViewEngine

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

屬性值

備註

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

  • {0} - 動作名稱
  • {1} - 控制器名稱
  • {2} - 區功能變數名稱稱

這些位置的值會在區分大小寫的檔案系統上區分大小寫。 例如,區域下 動作的 HomeController 檢視 Test 應該位於 /Areas/Admin/Views/Home/Test.cshtmlAdmin /areas/admin/views/home/test.cshtml之類的位置不會被探索。

適用於