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와 같은 페이지가 지정된 instance 보기 엔진은 다음 위치에서 보기를 검색합니다.

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

적용 대상