Description Property

Part.Description Property


Gets or sets a brief phrase that summarizes what the part control does, for use in ToolTips and catalogs of part controls.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

public virtual string Description { get; set; }

Property Value

Type: System.String

A string that briefly summarizes the part control's functionality. The default value is an empty string ("").

The Description property is typically a string that is used in catalogs that provide lists of part controls, and as a ToolTip in the part control's title bar. The content of the Description appears in a ToolTip when you position your mouse pointer over the title text in a part control's title bar. The ToolTip text is created from the value of the DisplayTitle property, followed by a hyphen, followed by the Description property value.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and ASP.NET Globalization and Localization.

Notes to Inheritors:

Derived classes such as WebPart can override Description to enable user personalization of the control's description.

The following code example illustrates the declarative use of the Description property in a part control. This example requires the custom WebPart control TextDisplayWebPart, which can be found in the Example section of the Part class summary.

After you load the page in a browser, if you position your mouse pointer over the title text of the first control instance, the description text appears in a ToolTip.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft