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

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

CatalogZoneBase.HeaderText プロパティ

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

ゾーンヘッダー領域テキスト取得または設定します

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

Public Overrides Property
 HeaderText As String
Dim instance As CatalogZoneBase
Dim value As String

value = instance.HeaderText

instance.HeaderText = value
public override string HeaderText { get;
 set; }
/** @property */
public String get_HeaderText ()

/** @property */
public void set_HeaderText (String value)

プロパティ
ゾーンヘッダー テキストを含む文字列.NET Framework提供する、カルチャ固有の既定文字列です。

解説解説
使用例使用例

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

コード例では 2 つ<asp:catalogzone> 要素宣言してます。2 つ目の要素は、CatalogPart コントロール宣言していませんが、どちらもHeaderText プロパティの値を宣言してます。

<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 番目の部分では、1 つ目のゾーンHeaderText プロパティの値がプログラムによって別の値に代入されています。

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";
}

ブラウザページ読み込む場合ドロップダウン リスト コントロールの [カタログ] を選択してカタログ表示モード切り替えることができますカタログ表示されると、各ゾーンヘッダー領域に各 HeaderText プロパティの値が表示されているのを確認できます。[Set Zone Text Properties] ボタンクリックして上のゾーンHeaderText プロパティに、コード代入されていた値を設定できます

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



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

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

   

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



CatalogZoneBase.HeaderText プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS