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

Public Overrides Property Description As String
Dim instance As WebPart Dim value As String value = instance.Description instance.Description = value
public: virtual property String^ Description { String^ get () override; void set (String^ value) override; }
/** @property */ public String get_Description () /** @property */ public void set_Description (String value)
public override function get Description () : String public override function set Description (value : String)
パーツ コントロールの機能を簡潔にまとめた文字列。既定値は空の文字列 ("") です。

Description プロパティは、通常、パーツ コントロールのリストを提供するカタログで使用されたり、コントロールのタイトル バーでツールヒントとして使用されたりする文字列です。マウス ポインタをパーツ コントロールのタイトル バーのタイトル テキスト上に移動すると、Description プロパティの内容がツールヒントに表示されます。ツールヒントのテキストは、DisplayTitle プロパティの値から作成され、その後にハイフン (-) と Description プロパティ値が続きます。
このプロパティを使用するコード例については、基本 Description プロパティのトピックを参照してください。
このプロパティのパーソナル化スコープは Shared に設定され、承認されたユーザーだけが変更できます。詳細については、PersonalizableAttribute、Web パーツのパーソナル化の概要 の各トピックを参照してください。

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebPartDescription クラス
アセンブリ: System.Web (system.web.dll 内)


ユーザーがページに追加できるコントロールのカタログに WebPart コントロールが表示される場合、各コントロールについてのいくつかの基本情報が必要です。たとえば、コントロールのタイトルと説明があれば、ユーザーがカタログを表示するときにコントロールをページに追加するかどうかを判断する材料が得られるので便利です。ただし、WebPart コントロールのカタログには多数のコントロールが含まれる可能性があるので、カタログに表示する情報を抽出するために各 WebPart コントロールのインスタンスを作成する必要がある場合は、アプリケーションのパフォーマンスに影響することがあります。
WebPartDescription クラスが存在するので、コントロールのカタログに表示されるコントロールについての情報を取得するために WebPart コントロールのインスタンスを作成する必要はありません。Web パーツ コントロール セットでは、ページがカタログ表示モードの場合に、WebPartDescription オブジェクトをさまざまな CatalogPart コントロールと組み合わせても使用します。
WebPartDescription クラスには、そのコンストラクタの 2 つのオーバーロードがあります。1 つは、インスタンスが利用できる場合に WebPart コントロールをパラメータとして受け取ります (WebPartDescription コンストラクタ)。もう 1 つは、コントロールについての情報を含む複数の文字列をパラメータとして受け取ります (WebPartDescription コンストラクタ)。
WebPartDescription クラスには、WebPart コントロールの説明情報を含むように設計された複数のプロパティもあります。WebPartDescription プロパティと、各プロパティが WebPart コントロールのどのプロパティに対応するかをまとめた表を次に示します。
CatalogIconImageUrl | CatalogIconImageUrl |

WebPartDescription クラスのプログラムでの使用方法を示すコード例を次に示します。通常、このタイプは、主に Web パーツ コントロール セットによって使用されますが、このコード例は、単に主要な説明プロパティの基本的なプログラムでの使用方法を示しています。
コード例の最初の部分は、ユーザー コントロールです。ユーザー コントロールのソース コードは、別のトピックのものを使用しています。ユーザーコントロールの詳細については、「チュートリアル : Web パーツ ページでの表示モードの変更」のトピックを参照してください。
<%@ control language="vb" classname="DisplayModeMenuVB"%> <script runat="server"> ' Use a field to reference the current WebPartManager. Dim _manager As WebPartManager Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs) AddHandler Page.InitComplete, AddressOf InitComplete End Sub Sub InitComplete(ByVal sender As Object, ByVal e As System.EventArgs) _manager = WebPartManager.GetCurrentWebPartManager(Page) Dim browseModeName As String = WebPartManager.BrowseDisplayMode.Name ' Fill the dropdown with the names of supported display modes. Dim mode As WebPartDisplayMode For Each mode In _manager.SupportedDisplayModes Dim modeName As String = mode.Name ' Make sure a mode is enabled before adding it. If mode.IsEnabled(_manager) Then Dim item As New ListItem(modeName, modeName) DisplayModeDropdown.Items.Add(item) End If Next mode ' If shared scope is allowed for this user, display the scope-switching ' UI and select the appropriate radio button for the current user scope. If _manager.Personalization.CanEnterSharedScope Then Panel2.Visible = True If _manager.Personalization.Scope = PersonalizationScope.User Then RadioButton1.Checked = True Else RadioButton2.Checked = True End If End If End Sub ' Change the page to the selected display mode. Sub DisplayModeDropdown_SelectedIndexChanged(ByVal sender As Object, _ ByVal e As EventArgs) Dim selectedMode As String = DisplayModeDropdown.SelectedValue Dim mode As WebPartDisplayMode = _ _manager.SupportedDisplayModes(selectedMode) If Not (mode Is Nothing) Then _manager.DisplayMode = mode End If End Sub ' Set the selected item equal to the current display mode. Sub Page_PreRender(ByVal sender As Object, ByVal e As EventArgs) Dim items As ListItemCollection = DisplayModeDropdown.Items Dim selectedIndex As Integer = _ items.IndexOf(items.FindByText(_manager.DisplayMode.Name)) DisplayModeDropdown.SelectedIndex = selectedIndex End Sub ' Reset all of a user's personalization data for the page. Protected Sub LinkButton1_Click(ByVal sender As Object, _ ByVal e As EventArgs) _manager.Personalization.ResetPersonalizationState() End Sub ' If not in User personalization scope, toggle into it. Protected Sub RadioButton1_CheckedChanged(ByVal sender As Object, _ ByVal e As EventArgs) If _manager.Personalization.Scope = PersonalizationScope.Shared Then _manager.Personalization.ToggleScope() End If End Sub ' If not in Shared scope, and if user is allowed, toggle the scope. Protected Sub RadioButton2_CheckedChanged(ByVal sender As Object, _ ByVal e As EventArgs) If _manager.Personalization.CanEnterSharedScope AndAlso _ _manager.Personalization.Scope = PersonalizationScope.User Then _manager.Personalization.ToggleScope() End If End Sub </script> <div> <asp:Panel ID="Panel1" runat="server" Borderwidth="1" Width="230" BackColor="lightgray" Font-Names="Verdana, Arial, Sans Serif" > <asp:Label ID="Label1" runat="server" Text=" Display Mode" Font-Bold="true" Font-Size="8" Width="120" /> <div> <asp:DropDownList ID="DisplayModeDropdown" runat="server" AutoPostBack="true" Width="120" OnSelectedIndexChanged="DisplayModeDropdown_SelectedIndexChanged" /> <asp:LinkButton ID="LinkButton1" runat="server" Text="Reset User State" ToolTip="Reset the current user's personalization data for the page." Font-Size="8" OnClick="LinkButton1_Click" /> </div> <asp:Panel ID="Panel2" runat="server" GroupingText="Personalization Scope" Font-Bold="true" Font-Size="8" Visible="false" > <asp:RadioButton ID="RadioButton1" runat="server" Text="User" AutoPostBack="true" GroupName="Scope" OnCheckedChanged="RadioButton1_CheckedChanged" /> <asp:RadioButton ID="RadioButton2" runat="server" Text="Shared" AutoPostBack="true" GroupName="Scope" OnCheckedChanged="RadioButton2_CheckedChanged" /> </asp:Panel> </asp:Panel> </div>
<%@ control language="C#" classname="DisplayModeMenuCS"%> <script runat="server"> // Use a field to reference the current WebPartManager. WebPartManager _manager; void Page_Init(object sender, EventArgs e) { Page.InitComplete += new EventHandler(InitComplete); } void InitComplete(object sender, System.EventArgs e) { _manager = WebPartManager.GetCurrentWebPartManager(Page); String browseModeName = WebPartManager.BrowseDisplayMode.Name; // Fill the dropdown with the names of supported display modes. foreach (WebPartDisplayMode mode in _manager.SupportedDisplayModes) { String modeName = mode.Name; // Make sure a mode is enabled before adding it. if (mode.IsEnabled(_manager)) { ListItem item = new ListItem(modeName, modeName); DisplayModeDropdown.Items.Add(item); } } // If shared scope is allowed for this user, display the scope-switching // UI and select the appropriate radio button for the current user scope. if (_manager.Personalization.CanEnterSharedScope) { Panel2.Visible = true; if (_manager.Personalization.Scope == PersonalizationScope.User) RadioButton1.Checked = true; else RadioButton2.Checked = true; } } // Change the page to the selected display mode. void DisplayModeDropdown_SelectedIndexChanged(object sender, EventArgs e) { String selectedMode = DisplayModeDropdown.SelectedValue; WebPartDisplayMode mode = _manager.SupportedDisplayModes[selectedMode]; if (mode != null) _manager.DisplayMode = mode; } // Set the selected item equal to the current display mode. void Page_PreRender(object sender, EventArgs e) { ListItemCollection items = DisplayModeDropdown.Items; int selectedIndex = items.IndexOf(items.FindByText(_manager.DisplayMode.Name)); DisplayModeDropdown.SelectedIndex = selectedIndex; } // Reset all of a user's personalization data for the page. protected void LinkButton1_Click(object sender, EventArgs e) { _manager.Personalization.ResetPersonalizationState(); } // If not in User personalization scope, toggle into it. protected void RadioButton1_CheckedChanged(object sender, EventArgs e) { if (_manager.Personalization.Scope == PersonalizationScope.Shared) _manager.Personalization.ToggleScope(); } // If not in Shared scope, and if user is allowed, toggle the scope. protected void RadioButton2_CheckedChanged(object sender, EventArgs e) { if (_manager.Personalization.CanEnterSharedScope && _manager.Personalization.Scope == PersonalizationScope.User) _manager.Personalization.ToggleScope(); } </script> <div> <asp:Panel ID="Panel1" runat="server" Borderwidth="1" Width="230" BackColor="lightgray" Font-Names="Verdana, Arial, Sans Serif" > <asp:Label ID="Label1" runat="server" Text=" Display Mode" Font-Bold="true" Font-Size="8" Width="120" /> <div> <asp:DropDownList ID="DisplayModeDropdown" runat="server" AutoPostBack="true" Width="120" OnSelectedIndexChanged="DisplayModeDropdown_SelectedIndexChanged" /> <asp:LinkButton ID="LinkButton1" runat="server" Text="Reset User State" ToolTip="Reset the current user's personalization data for the page." Font-Size="8" OnClick="LinkButton1_Click" /> </div> <asp:Panel ID="Panel2" runat="server" GroupingText="Personalization Scope" Font-Bold="true" Font-Size="8" Visible="false" > <asp:RadioButton ID="RadioButton1" runat="server" Text="User" AutoPostBack="true" GroupName="Scope" OnCheckedChanged="RadioButton1_CheckedChanged" /> <asp:RadioButton ID="RadioButton2" runat="server" Text="Shared" AutoPostBack="true" GroupName="Scope" OnCheckedChanged="RadioButton2_CheckedChanged" /> </asp:Panel> </asp:Panel> </div>
コード例の 2 番目の部分は、カスタム WebPart コントロールです。コード例を実行するためには、このソース コードをコンパイルする必要があります。それを明示的にコンパイルし、コンパイル済みのアセンブリを Web サイトの Bin フォルダまたはグローバル アセンブリ キャッシュに配置できます。サイトの App_Code フォルダにソース コードを配置し、実行時に動的にコンパイルすることもできます。このコード例は、動的コンパイルのアプローチを使用します。コンパイル方法を示すチュートリアルについては、「チュートリアル : カスタム サーバー コントロールの開発と使用」を参照してください。
Imports System Imports System.Collections Imports System.ComponentModel Imports System.Drawing Imports System.Security.Permissions Imports System.Web Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Web.UI.WebControls.WebParts Namespace Samples.AspNet.VB.Controls <AspNetHostingPermission(SecurityAction.Demand, _ Level:=AspNetHostingPermissionLevel.Minimal)> _ <AspNetHostingPermission(SecurityAction.InheritanceDemand, _ Level:=AspNetHostingPermissionLevel.Minimal)> _ Public Class TextDisplayWebPart Inherits WebPart Private _contentText As String = Nothing Private _fontStyle As String = Nothing Private input As TextBox Private DisplayContent As Label Private lineBreak As Literal <Personalizable(), WebBrowsable()> _ Public Property ContentText() As String Get Return _contentText End Get Set(ByVal value As String) _contentText = value End Set End Property Protected Overrides Sub CreateChildControls() Controls.Clear() DisplayContent = New Label() DisplayContent.BackColor = Color.LightBlue DisplayContent.Text = Me.ContentText Me.Controls.Add(DisplayContent) lineBreak = New Literal() lineBreak.Text = "<br />" Controls.Add(lineBreak) input = New TextBox() Me.Controls.Add(input) Dim update As New Button() update.Text = "Set Label Content" AddHandler update.Click, AddressOf Me.submit_Click Me.Controls.Add(update) End Sub Private Sub submit_Click(ByVal sender As Object, _ ByVal e As EventArgs) ' Update the label string. If input.Text <> String.Empty Then _contentText = input.Text + "<br />" input.Text = String.Empty DisplayContent.Text = Me.ContentText End If End Sub End Class End Namespace
using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Security.Permissions; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; namespace Samples.AspNet.CS.Controls { [AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] public class TextDisplayWebPart : WebPart { private String _contentText = null; TextBox input; Label DisplayContent; Literal lineBreak; [Personalizable(), WebBrowsable] public String ContentText { get { return _contentText; } set { _contentText = value; } } protected override void CreateChildControls() { Controls.Clear(); DisplayContent = new Label(); DisplayContent.BackColor = Color.LightBlue; DisplayContent.Text = this.ContentText; this.Controls.Add(DisplayContent); lineBreak = new Literal(); lineBreak.Text = @"<br />"; Controls.Add(lineBreak); input = new TextBox(); this.Controls.Add(input); Button update = new Button(); update.Text = "Set Label Content"; update.Click += new EventHandler(this.submit_Click); this.Controls.Add(update); } private void submit_Click(object sender, EventArgs e) { // Update the label string. if (input.Text != String.Empty) { _contentText = input.Text + @"<br />"; input.Text = String.Empty; DisplayContent.Text = this.ContentText; } } } }
コード例の 3 番目の部分は Web ページです。先頭近くにあるのは 2 つの Register ディレクティブです。1 つはユーザー コントロールを登録します。もう 1 つは、ソース ファイルが各自のサイトの App_Code フォルダにあるカスタムの WebPart コントロールを登録します。ページは <asp:catalogzone> 要素を格納し、この要素は 2 つのコントロールへの宣言参照を格納します。1 つは TextDisplayWebPart という名前のカスタム WebPart コントロール、もう 1 つは BulletedList Web サーバー コントロールです。後者は、実行時に WebPart コントロールとして扱われますが、これはこのコントロールを WebPartManager コントロールが GenericWebPart オブジェクトでラップするからです。Button1_Click メソッドのコードでは、カタログ内の WebPart コントロールで利用できる WebPartDescription オブジェクトは、GetAvailableWebPartDescriptions メソッドを使用して取得され、説明の詳細がすべてページに書き込まれます。
<%@ Page Language="vb" %> <%@ Register TagPrefix="uc1" TagName="DisplayModeMenuVB" Src="~/DisplayModeMenuVB.ascx" %> <%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.VB.Controls"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> Protected Sub Button1_Click(ByVal sender As Object, _ ByVal e As System.EventArgs) Label1.Text = String.Empty Dim descriptions As WebPartDescriptionCollection = _ DeclarativeCatalogPart1.GetAvailableWebPartDescriptions() Dim desc As WebPartDescription For Each desc In descriptions Label1.Text += "ID: " & desc.ID & "<br />" & _ "Title: " & desc.Title & "<br />" & _ "Description: " & desc.Description & "<br />" & _ "ImageUrl: " & desc.CatalogIconImageUrl & "<br />" & _ "<hr />" Next End Sub Protected Sub Page_PreRender(ByVal sender As Object, _ ByVal e As System.EventArgs) If mgr1.DisplayMode Is WebPartManager.CatalogDisplayMode Then Button1.Visible = True Label1.Visible = True Else Button1.Visible = False Label1.Visible = False End If End Sub </script> <html > <head id="Head1" runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:WebPartManager ID="mgr1" runat="server"> </asp:WebPartManager> <uc1:DisplayModeMenuVB ID="menu1" runat="server" /> <asp:WebPartZone ID="WebPartZone1" runat="server"> <ZoneTemplate> <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar> </ZoneTemplate> </asp:WebPartZone> <asp:CatalogZone ID="CatalogZone1" runat="server"> <ZoneTemplate> <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" runat="server"> <WebPartsTemplate> <aspSample:TextDisplayWebPart ID="txtDisplayWebPart1" runat="server" Title="Text Display" Description="Displays entered text in a label control." CatalogIconImageUrl="MyWebPartIcon.gif" /> <asp:BulletedList ID="BulletedList1" Runat="server" DisplayMode="HyperLink" Title="Favorite Links" CatalogIconImageUrl="MyLinksIcon.gif" Description="My Favorite Links"> <asp:ListItem Value="http://msdn.microsoft.com"> MSDN </asp:ListItem> <asp:ListItem Value="http://www.asp.net"> ASP.NET </asp:ListItem> <asp:ListItem Value="http://www.msn.com"> MSN </asp:ListItem> </asp:BulletedList> </WebPartsTemplate> </asp:DeclarativeCatalogPart> </ZoneTemplate> </asp:CatalogZone> <hr /> <asp:Button ID="Button1" runat="server" Text="List WebPartDescription Info" OnClick="Button1_Click" /> <br /> <asp:Label ID="Label1" runat="server" Text="" /> <div> </div> </form> </body> </html>
<%@ Page Language="C#" %> <%@ Register TagPrefix="uc1" TagName="DisplayModeMenuCS" Src="~/DisplayModeMenuCS.ascx" %> <%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.CS.Controls"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void Button1_Click(object sender, EventArgs e) { Label1.Text = String.Empty; WebPartDescriptionCollection descriptions = DeclarativeCatalogPart1.GetAvailableWebPartDescriptions(); foreach (WebPartDescription desc in descriptions) { Label1.Text += "ID: " + desc.ID + "<br />" + "Title: " + desc.Title + "<br />" + "Description: " + desc.Description + "<br />" + "ImageUrl: " + desc.CatalogIconImageUrl + "<br />" + "<hr />"; } } protected void Page_PreRender(object sender, EventArgs e) { if (mgr1.DisplayMode == WebPartManager.CatalogDisplayMode) { Button1.Visible = true; Label1.Visible = true; } else { Button1.Visible = false; Label1.Visible = false; } } </script> <html > <head id="Head1" runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:WebPartManager ID="mgr1" runat="server"> </asp:WebPartManager> <uc1:DisplayModeMenuCS ID="menu1" runat="server" /> <asp:WebPartZone ID="WebPartZone1" runat="server"> <ZoneTemplate> <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar> </ZoneTemplate> </asp:WebPartZone> <asp:CatalogZone ID="CatalogZone1" runat="server"> <ZoneTemplate> <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" runat="server"> <WebPartsTemplate> <aspSample:TextDisplayWebPart ID="txtDisplayWebPart1" runat="server" Title="Text Display" Description="Displays entered text in a label control." CatalogIconImageUrl="MyWebPartIcon.gif" /> <asp:BulletedList ID="BulletedList1" Runat="server" DisplayMode="HyperLink" Title="Favorite Links" CatalogIconImageUrl="MyLinksIcon.gif" Description="My Favorite Links"> <asp:ListItem Value="http://msdn.microsoft.com"> MSDN </asp:ListItem> <asp:ListItem Value="http://www.asp.net"> ASP.NET </asp:ListItem> <asp:ListItem Value="http://www.msn.com"> MSN </asp:ListItem> </asp:BulletedList> </WebPartsTemplate> </asp:DeclarativeCatalogPart> </ZoneTemplate> </asp:CatalogZone> <hr /> <asp:Button ID="Button1" runat="server" Text="List WebPartDescription Info" OnClick="Button1_Click" /> <br /> <asp:Label ID="Label1" runat="server" Text="" /> <div> </div> </form> </body> </html>
ブラウザにページを読み込んだ後、[表示モード] ドロップダウン リスト コントロールを使用し、[カタログ] を選択して、ページをカタログ表示モードに変更します。カタログには、ページへの追加が可能な 2 つのコントロールが表示されます。[List WebPartDescription Information] ボタンをクリックすると、コードによって、利用可能なすべてのWebPartDescription オブジェクトの値がページに書き込まれます。これは、カタログ内の WebPart コントロールの説明の詳細を、コントロール自体のインスタンスを作成しなくても取得できることを示します。


System.Web.UI.WebControls.WebParts.WebPartDescription


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebPartDescription コンストラクタ (String, String, String, String)
アセンブリ: System.Web (system.web.dll 内)

Public Sub New ( _ id As String, _ title As String, _ description As String, _ imageUrl As String _ )
Dim id As String Dim title As String Dim description As String Dim imageUrl As String Dim instance As New WebPartDescription(id, title, description, imageUrl)
public function WebPartDescription ( id : String, title : String, description : String, imageUrl : String )
- description
Description に代入する値。
- imageUrl
CatalogIconImageUrl に代入する値。

WebPartDescription コンストラクタは、WebPart コントロールが利用できない場合に、WebPartDescription クラスの新しいインスタンスの作成に使用されます。たとえば、これは、WebPart コントロールの説明ファイルをインポートする場合の ImportCatalogPart コントロールに当てはまります。WebPartDescription オブジェクトの作成に必要な情報は、説明ファイルから直接取得されます。WebPart インスタンスは存在しません。

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebPartDescription コンストラクタ
WebPartDescription コンストラクタのそれぞれのオーバーロードは、WebPartDescription クラスの新しいインスタンスを返します。このインスタンスには、特定の WebPart コントロールについての情報が格納されます。オーバーロードは、新しいインスタンスが作成されるシナリオによって異なります。また、アプリケーションに WebPart コントロールの利用可能なインスタンスがある場合、WebPartDescription コンストラクタが使用されます。アプリケーションがコントロール インスタンスを持たない場合は、コントロールの説明ファイルが ImportCatalogPart コントロールを通じてインポートされる場合のように、WebPartDescription コンストラクタが使用されます。
ASP.NET Web パーツ ページ GetAvailableWebPartDescriptions
名前 | 説明 |
---|---|
WebPartDescription (WebPart) | WebPart コントロール インスタンスを利用できる場合は、クラスの新しいインスタンスを初期化します。 |
WebPartDescription (String, String, String, String) | WebPart コントロールの説明情報を含む複数の文字列を使用して、クラスの新しいインスタンスを初期化します。 |

関連項目
WebPartDescription クラスWebPartDescription メンバ
System.Web.UI.WebControls.WebParts 名前空間
GetAvailableWebPartDescriptions
その他の技術情報
ASP.NET Web パーツ ページWebPartDescription コンストラクタ (WebPart)
アセンブリ: System.Web (system.web.dll 内)


WebPartDescription コンストラクタは、既存の WebPart コントロールに基づいた新しい WebPartDescription オブジェクトの作成に使用されます。このコンストラクタは、単に他のオーバーロードである WebPartDescription(String,String,String,String) コンストラクタを呼び出して、part パラメータのプロパティから必須パラメータ値を取得します。

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebPartDescription プロパティ

名前 | 説明 | |
---|---|---|
![]() | CatalogIconImageUrl | WebPart コントロールのアイコンとして使用されるイメージへのパスを含む URL を取得します。 |
![]() | Description | WebPart コントロールの説明のテキストを取得します。 |
![]() | ID | 対応する WebPart コントロールの ID を取得します。 |
![]() | Title | 対応する WebPart コントロールのタイトルのテキストを取得します。 |

関連項目
WebPartDescription クラスSystem.Web.UI.WebControls.WebParts 名前空間
GetAvailableWebPartDescriptions
WebPartDescriptionCollection
その他の技術情報
ASP.NET Web パーツ ページWebPartDescription メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

関連項目
WebPartDescription クラスSystem.Web.UI.WebControls.WebParts 名前空間
GetAvailableWebPartDescriptions
WebPartDescriptionCollection
その他の技術情報
ASP.NET Web パーツ ページWebPartDescription メンバ
コントロールのインスタンスを作成しなくても Web パーツ コントロールのカタログに表示できる WebPart コントロールについての情報を提供します。
WebPartDescription データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | CatalogIconImageUrl | WebPart コントロールのアイコンとして使用されるイメージへのパスを含む URL を取得します。 |
![]() | Description | WebPart コントロールの説明のテキストを取得します。 |
![]() | ID | 対応する WebPart コントロールの ID を取得します。 |
![]() | Title | 対応する WebPart コントロールのタイトルのテキストを取得します。 |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

関連項目
WebPartDescription クラスSystem.Web.UI.WebControls.WebParts 名前空間
GetAvailableWebPartDescriptions
WebPartDescriptionCollection
その他の技術情報
ASP.NET Web パーツ ページWeblioに収録されているすべての辞書からWebPart.Descriptionを検索する場合は、下記のリンクをクリックしてください。

- WebPart.Descriptionのページへのリンク