Page.MasterPageFile 속성

정의

마스터 페이지의 가상 경로를 가져오거나 설정합니다.

public:
 virtual property System::String ^ MasterPageFile { System::String ^ get(); void set(System::String ^ value); };
public virtual string MasterPageFile { get; set; }
member this.MasterPageFile : string with get, set
Public Overridable Property MasterPageFile As String

속성 값

마스터 페이지의 가상 경로입니다.

예외

MasterPageFile 이벤트가 완료된 후에 PreInit 속성이 설정된 경우

MasterPageFile 속성에 지정된 파일이 없는 경우

또는

페이지에 최상위 컨트롤인 Content 컨트롤이 없는 경우

설명

MasterPageFile 속성이 (애플리케이션의 루트)에서이 페이지를 사용 하 여 연결 된 마스터 페이지 파일 가상 경로입니다. 속성은 MasterPageFile 이벤트에서만 PreInit 설정할 수 있습니다. 이벤트가 예외를 throw InvalidOperationExceptionMasterPageFilePreInit 속성을 설정하려고 합니다. 속성이 MasterPageFile 유효하지 않은 경우 형식 HttpException 의 예외는 나중에 페이지 수명 주기에서 throw되지만 속성이 이벤트에서 설정 PreInit 되면 예외가 throw되지 않습니다.

속성이 MasterPageFile 설정된 페이지는 콘텐츠 페이지이므로 컨트롤인 최상위 컨트롤 Content 만 포함할 수 있습니다.

적용 대상

추가 정보