Share via


CatalogZoneBase.EmptyZoneText 속성

정의

영역에 컨트롤이 없는 경우 표시되는 메시지를 가져오거나 설정합니다.

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 하는 방법을 보여 줍니다. 예제를 실행 하는 데 필요한 전체 코드의 예제 섹션을 참조 하세요.를 CatalogZoneBase 클래스 개요입니다.

코드 예제에서는 두 요소를 <asp:catalogzone> 선언하고 두 번째 요소는 속성에 값을 EmptyZoneText 할당하지만 컨트롤을 선언 CatalogPart 하지 않습니다.

<asp:CatalogZone ID="CatalogZone1" runat="server"
  EmptyZoneText="No controls are in the zone."
  HeaderText="My Web Parts Catalog"
  InstructionText="Add Web Parts controls to the zone."
  PartLinkStyle-Font-Italic="true"
  SelectedPartLinkStyle-Font-Bold="true"
  SelectTargetZoneText="Select zone"
  AddVerb-Text="Add Control"
  CloseVerb-Description="Close and return to browse mode." 
  SelectedCatalogPartID="Currently Selected CatalogPart ID.">
  <ZoneTemplate>
    <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" 
      runat="server">
      <WebPartsTemplate>
        <aspSample:TextDisplayWebPart 
          runat="server"   
          id="textwebpart" 
          title = "Text Content WebPart" 
          ExportMode="All"/>  
        <asp:Calendar id="calendar1" runat="server" 
          Title="My Calendar" />               
      </WebPartsTemplate>
    </asp:DeclarativeCatalogPart> 
    <asp:PageCatalogPart ID="PageCatalogPart1" runat="server" />
    <asp:ImportCatalogPart ID="ImportCatalogPart1" runat="server" /> 
  </ZoneTemplate>
</asp:CatalogZone>
<hr />
<asp:CatalogZone ID="CatalogZone2" runat="server"
  BorderWidth="2"
  HeaderText="My Empty CatalogZone"
  EmptyZoneText="No controls are in the zone." />
<asp:CatalogZone ID="CatalogZone1" runat="server"
  EmptyZoneText="No controls are in the zone."
  HeaderText="My Web Parts Catalog"
  InstructionText="Add Web Parts controls to the zone."
  PartLinkStyle-Font-Italic="true"
  SelectedPartLinkStyle-Font-Bold="true"
  SelectTargetZoneText="Select zone"
  AddVerb-Text="Add Control"
  CloseVerb-Description="Close and return to browse mode." 
  SelectedCatalogPartID="Currently Selected CatalogPart ID.">
  <ZoneTemplate>
    <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" 
      runat="server">
      <WebPartsTemplate>
        <aspSample:TextDisplayWebPart 
          runat="server"   
          id="textwebpart" 
          title = "Text Content WebPart" 
          ExportMode="All"/>  
        <asp:Calendar id="calendar1" runat="server" 
          Title="My Calendar" />               
      </WebPartsTemplate>
    </asp:DeclarativeCatalogPart> 
    <asp:PageCatalogPart ID="PageCatalogPart1" runat="server" />
    <asp:ImportCatalogPart ID="ImportCatalogPart1" runat="server" /> 
  </ZoneTemplate>
</asp:CatalogZone>
<hr />
<asp:CatalogZone ID="CatalogZone2" runat="server"
  BorderWidth="2"
  HeaderText="My Empty CatalogZone"
  EmptyZoneText="No controls are in the zone." />

브라우저에서 페이지를 로드할 때 드롭다운 목록에서 카탈로그 를 선택하여 카탈로그 표시 모드로 전환할 수 있습니다. 카탈로그가 표시되면 두 개의 컨트롤이 포함된 첫 번째 영역 아래에 두 CatalogPart 번째 영역이 표시되고 컨트롤이 없기 때문에 속성의 EmptyZoneText 내용이 표시됩니다.

설명

영역에 컨트롤이 EmptyZoneText 없는 CatalogPart 경우 웹 페이지가 카탈로그 모드로 전환될 때 속성의 CatalogZoneBase 문자열 값이 표시됩니다.

적용 대상

추가 정보