Part.Description プロパティ
アセンブリ: System.Web (system.web.dll 内)

<LocalizableAttribute(True)> _ Public Overridable Property Description As String
[LocalizableAttribute(true)] public: virtual property String^ Description { String^ get (); void set (String^ value); }
/** @property */ public String get_Description () /** @property */ public void set_Description (String value)
パーツ コントロールの機能を簡潔にまとめた文字列。既定値は空の文字列 ("") です。

Description プロパティは、通常、パーツ コントロールのリストを提供するカタログで使用されたり、コントロールのタイトル バーでツールヒントとして使用されたりする文字列です。マウス ポインタをパーツ コントロールのタイトル バーのタイトル テキスト上に移動すると、Description の内容がツールヒントに表示されます。ツールヒントのテキストは、DisplayTitle プロパティの値から作成され、その後にハイフン (-) と Description プロパティ値が続きます。
このプロパティの値は、設定時に、デザイナ ツールを使用してリソース ファイルに自動的に保存できます。詳細については、LocalizableAttribute、ASP.NET のグローバリゼーションおよびローカリゼーション の各トピックを参照してください。
継承時の注意 WebPart などの派生クラスでは、Description をオーバーライドして、ユーザーがコントロールの説明をパーソナル化できるようにできます。
パーツ コントロールで、Description プロパティを宣言によって使用するコード例を次に示します。この例には、TextDisplayWebPart というカスタムの WebPart コントロールが必要です。これについては、Part クラスの概要にある「例」を参照してください。
ブラウザでページを読み込み、マウス ポインタを最初のコントロール インスタンスのタイトル テキスト上に移動すると、ツールヒントに説明のテキストが表示されます。
<%@ page language="VB" %> <%@ register tagprefix="aspSample" Namespace="Samples.AspNet.VB.Controls" Assembly="TextDisplayWebPartVB" %> <html> <head id="Head1" runat="server"> </head> <body> <form id="Form1" runat="server"> <asp:webpartmanager id="WebPartManager1" runat="server" /> <asp:webpartzone id="WebPartZone1" runat="server" backcolor="#99cccc"> <parttitlestyle font-bold="true" forecolor="#ffffff" /> <partstyle borderwidth="1px" borderstyle="Solid" bordercolor="#81AAF2" /> <zonetemplate> <aspSample:TextDisplayWebPart runat="server" id="textwebpart" title = "Text Content WebPart" Description="A text content WebPart control." ChromeType="TitleAndBorder" width="350px" /> </zonetemplate> </asp:webpartzone> <asp:webpartzone id="WebPartZone2" runat="server" backcolor="#99cccc"> <parttitlestyle font-bold="true" forecolor="#ffffff" /> <partstyle borderwidth="1px" borderstyle="Solid" bordercolor="#81AAF2" /> <zonetemplate> <aspSample:TextDisplayWebPart runat="server" id="textwebpart2" title = "Text Content WebPart 2" Description="A text content WebPart control." ChromeType="TitleOnly" ChromeState="Minimized" width="350px" /> </zonetemplate> </asp:webpartzone> </form> </body> </html>
<%@ page language="C#" %> <%@ register tagprefix="aspSample" Namespace="Samples.AspNet.CS.Controls" Assembly="TextDisplayWebPartCS" %> <html> <head id="Head1" runat="server"> </head> <body> <form id="Form1" runat="server"> <asp:webpartmanager id="WebPartManager1" runat="server" /> <asp:webpartzone id="WebPartZone1" runat="server" backcolor="#99cccc"> <parttitlestyle font-bold="true" forecolor="#ffffff" /> <partstyle borderwidth="1px" borderstyle="Solid" bordercolor="#81AAF2" /> <zonetemplate> <aspSample:TextDisplayWebPart runat="server" id="textwebpart" title = "Text Content WebPart" Description="A text content WebPart control." ChromeType="TitleAndBorder" width="350px" /> </zonetemplate> </asp:webpartzone> <asp:webpartzone id="WebPartZone2" runat="server" backcolor="#99cccc"> <parttitlestyle font-bold="true" forecolor="#ffffff" /> <partstyle borderwidth="1px" borderstyle="Solid" bordercolor="#81AAF2" /> <zonetemplate> <aspSample:TextDisplayWebPart runat="server" id="textwebpart2" title = "Text Content WebPart 2" Description="A text content WebPart control." ChromeType="TitleOnly" ChromeState="Minimized" width="350px" /> </zonetemplate> </asp:webpartzone> </form> </body> </html>
<%@ page language="VJ#" %> <%@ register tagprefix="aspSample" Namespace="Samples.AspNet.JSL.Controls" Assembly="TextDisplayWebPartJSL" %> <html> <head id="Head1" runat="server"> </head> <body> <form id="Form1" runat="server"> <asp:webpartmanager id="WebPartManager1" runat="server" /> <asp:webpartzone id="WebPartZone1" runat="server" backcolor="#99cccc"> <parttitlestyle font-bold="true" forecolor="#ffffff" /> <partstyle borderwidth="1px" borderstyle="Solid" bordercolor="#81AAF2" /> <zonetemplate> <aspSample:TextDisplayWebPart runat="server" id="textwebpart" title = "Text Content WebPart" Description="A text content WebPart control." ChromeType="TitleAndBorder" width="350px" /> </zonetemplate> </asp:webpartzone> <asp:webpartzone id="WebPartZone2" runat="server" backcolor="#99cccc"> <parttitlestyle font-bold="true" forecolor="#ffffff" /> <partstyle borderwidth="1px" borderstyle="Solid" bordercolor="#81AAF2" /> <zonetemplate> <aspSample:TextDisplayWebPart runat="server" id="textwebpart2" title = "Text Content WebPart 2" Description="A text content WebPart control." ChromeType="TitleOnly" ChromeState="Minimized" width="350px" /> </zonetemplate> </asp:webpartzone> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- Part.Description プロパティのページへのリンク