GenericWebPart.Description Property

Note: This property is new in the .NET Framework version 2.0.

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

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

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)

Property Value

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

The Description property value is typically used as a descriptive string for a control in catalogs that provide lists of server controls, and as a ToolTip in a control's title bar. The content of the property appears in a ToolTip when a user positions the mouse pointer over the title text in a control's title bar.

This property overrides the base property so that you can access the property on the child control as if it were a true WebPart control.

You can set values for the property on your control in the declarative markup of a Web page, as well as programmatically. To provide a default value for the property whenever the control is used, you can implement the IWebPart interface.

The following code example demonstrates declarative and programmatic use of the Description property. The complete source code for the example is found in the Example section of the GenericWebPart overview topic.

The first part of the code example shows how the Description property is set declaratively on a server control within a WebPartZone control.

No code example is currently available or this language may not be supported.

The second part of the code example demonstrates how to access the property programmatically to display its value in a label.

No code example is currently available or this language may not be supported.

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: