WebPartZoneBase.EmptyZoneText 속성

정의

WebPartZoneBase 컨트롤에 WebPart 컨트롤이 포함되지 않은 경우 표시되는 메시지를 가져오거나 설정합니다.

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

속성 값

String

빈 영역에 표시되는 메시지를 포함하는 문자열입니다. 기본 문화권별 문자열은 .NET Framework에서 제공합니다.

예제

다음 코드 예제에서는 컨트롤에서 속성의 EmptyZoneText 선언적 사용을 보여 줍니다 WebPartZone . 코드 숨김 소스 파일 및 이 코드의 영역을 포함하는 .aspx 페이지를 포함한 전체 코드 예제는 클래스 개요를 WebPartZoneBase 참조하세요.

속성에 EmptyZoneText 선언적 태그에 할당된 값이 있습니다. 이 값은 브라우저에 WebPartZone2페이지를 로드한 후 페이지를 디자인 표시 모드로 전환하고 날짜를 WebPartZone2 WebPartZone1표시하는 컨트롤을 끌어서 표시합니다. 웹 파트 페이지에서 디스플레이 모드를 변경하는 방법에 대한 자세한 내용은 연습: 웹 파트 페이지에서 디스플레이 모드 변경을 참조하세요.

<asp:WebPartZone 
  ID="WebPartZone2"
  Runat="server" 
  DragHighlightColor="#00ff00"
  AllowLayoutChange="true"
  EmptyZoneText="Add WebParts to this empty Zone."
  BorderWidth="2"
  BorderColor="DarkBlue"
  BorderStyle="Dashed" 
  MenuLabelText="Verbs Menu" 
  MenuPopupImageUrl="label.gif" >
  <VerbStyle Font-Italic="true" />
  <MenuLabelStyle BackColor="Lime" BorderWidth="1"  />
  <MenuLabelHoverStyle Font-Bold="true" />
  <MenuVerbHoverStyle BackColor="LightGrey" />
  <MenuVerbStyle Font-Italic="true" /> 
  <ZoneTemplate>
    <asp:Label ID="Label1" Runat="server" Title="Date" />
  </ZoneTemplate>
</asp:WebPartZone>
<asp:WebPartZone 
  ID="WebPartZone2"
  Runat="server" 
  DragHighlightColor="#00ff00"
  AllowLayoutChange="true"
  EmptyZoneText="Add WebParts to this empty Zone."
  BorderWidth="2"
  BorderColor="DarkBlue"
  BorderStyle="Dashed" 
  MenuLabelText="Verbs Menu" 
  MenuPopupImageUrl="label.gif" >
  <VerbStyle Font-Italic="true" />
  <MenuLabelStyle BackColor="Lime" BorderWidth="1"  />
  <MenuLabelHoverStyle Font-Bold="true" />
  <MenuVerbHoverStyle BackColor="LightGrey" />
  <MenuVerbStyle Font-Italic="true" /> 
  <ZoneTemplate>
    <asp:Label ID="Label1" Runat="server" Title="Date" />
  </ZoneTemplate>
</asp:WebPartZone>

설명

속성이 EmptyZoneText 설정되지 않은 경우와 빈 문자열("")로 설정된 경우를 구분하기 위해 기본 속성을 재정의합니다.

속성이 설정되지 않았고 영역에 컨트롤이 없는 경우 웹 파트 페이지가 영역이 표시되는 표시 모드로 전환되면 기본 문화권별 텍스트 메시지가 빈 WebPartZoneBase 컨트롤에 나타납니다. 속성 값이 EmptyZoneText 의도적으로 빈 문자열로 설정된 경우 빈 영역에 문자 메시지가 표시되지 않습니다.

적용 대상

추가 정보