RazorViewEngineOptions.PageViewLocationFormats プロパティ

定義

Razor ページをレンダリングするコンテキストから検索するときにビュー (レイアウトや部分など) を検索する場所 RazorViewEngine を取得します。

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

プロパティ値

注釈

場所は、次の書式指定項目を含む書式指定文字列 (を参照 https://msdn.microsoft.com/en-us/library/txafckwd.aspx) です。

  • {0} - ビュー名
  • {1} - ページ名

PageViewLocationFormats は、ビューの位置エキスパンダーと連携して作業し、階層パス参照を実行します。 たとえば、/Pages をルートとして使用する /Account/Manage/Index などの Page を指定すると、ビュー エンジンは次の場所でビューを検索します。

/Pages/Account/Manage/{0}.cshtml /Pages/Account/{0}.cshtml /Pages/{0}.cshtml /Pages/Shared/{0}.cshtml /Views/Shared/{0}.cshtml

適用対象