IWebPart.Title Property

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

Gets or sets the title of a WebPart control.

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

property String^ Title {
	String^ get ();
	void set (String^ value);
}
/** @property */
String get_Title ()

/** @property */
void set_Title (String value)

function get Title () : String

function set Title (value : String)

Property Value

A string that contains the title of the control. The default value is an empty string ("").

The visible title text in a control's title bar is set by the Title property.

If you do not supply a title for a control, the Web Parts control set automatically calculates a default string to use as a title. For more information, see DisplayTitle. Also, it is possible to provide a default subtitle that is appended to the title string. For details, see Subtitle.

The following code example demonstrates declarative and programmatic use of the Title property. The complete source code for the example is found in the Example section of the IWebPart class overview.

The first part of the code example shows how the user control implements the Title property.

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

The second part of the code example demonstrates the method in the user control that programmatically sets the value of the Title property when a user selects the appropriate property name from the radio buttons on the page, sets a new value in the text box, and then clicks the Update button.

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

The third part of the code example shows how the user control that implements the IWebPart interface is referenced in a WebPartZone control, and how the Title property is set declaratively on the control.

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: