CatalogZoneBase.SelectTargetZoneText プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > CatalogZoneBase.SelectTargetZoneText プロパティの意味・解説 

CatalogZoneBase.SelectTargetZoneText プロパティ

メモ : このプロパティは、.NET Framework version 2.0 で新しく追加されたものです。

選択したコントロールの追加先のゾーンをユーザーが選択できるカタログ ユーザー インターフェイス (UI) で、コントロールの横に表示されるテキストを取得または設定します。

名前空間: System.Web.UI.WebControls.WebParts
アセンブリ: System.Web (system.web.dll 内)
構文構文

<LocalizableAttribute(True)> _
Public Overridable Property
 SelectTargetZoneText As String
Dim instance As CatalogZoneBase
Dim value As String

value = instance.SelectTargetZoneText

instance.SelectTargetZoneText = value
[LocalizableAttribute(true)] 
public virtual string SelectTargetZoneText
 { get; set; }
[LocalizableAttribute(true)] 
public:
virtual property String^ SelectTargetZoneText {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_SelectTargetZoneText ()

/** @property */
public void set_SelectTargetZoneText (String
 value)
public function get SelectTargetZoneText
 () : String

public function set SelectTargetZoneText
 (value : String)

プロパティ値
ゾーン選択コントロールの横に表示するテキストを含む文字列。.NET Framework が提供する、カルチャ固有の既定の文字列です。

解説解説
使用例使用例

SelectTargetZoneText プロパティの使用方法を次のコード例に示します。宣言を使用した方法とプログラムを使用した方法の 2 とおりの方法を紹介します。例の実行に必要なコード全体については、CatalogZoneBase クラスの概要で「例」を参照してください。

コード例の最初の部分では、2 つの <asp:catalogzone> 要素を宣言しており、1 つ目は SelectTargetZoneText プロパティの値を宣言しています。

<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." />

コード例の 2 番目の部分では、SelectTargetZoneText プロパティの値がプログラムによって変更されます。

Protected Sub Button3_Click(ByVal
 sender As Object, _
  ByVal e As EventArgs)
  CatalogZone1.SelectTargetZoneText = "Add to zone"
  CatalogZone1.EmptyZoneText = "Zone is empty"
  CatalogZone1.HeaderText = "My Updated Header"
  CatalogZone1.InstructionText = "My Updated Instructions"
End Sub
protected void Button3_Click(object sender,
 EventArgs e)
{
  CatalogZone1.SelectTargetZoneText = "Add to zone";
  CatalogZone1.EmptyZoneText = "Zone is empty";
  CatalogZone1.HeaderText = "My Updated Header";
  CatalogZone1.InstructionText = "My Updated Instructions";
}

ブラウザでページを読み込む場合、ドロップダウン リスト コントロールの [カタログ] を選択して、カタログ表示モードに切り替えることができます。カタログが表示されたら、カタログのフッターの DropDownList コントロールの横に表示されるテキストを確認します。[Set Zone Text Properties] ボタンをクリックすると、プロパティのテキスト値を変更できます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CatalogZoneBase クラス
CatalogZoneBase メンバ
System.Web.UI.WebControls.WebParts 名前空間
その他の技術情報
ASP.NET Web パーツ ページ



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

CatalogZoneBase.SelectTargetZoneText プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



CatalogZoneBase.SelectTargetZoneText プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS