Part.Title Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the title of a part control.

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

abstract Title : string with get, set
override Title : string with get, set

Property Value

Type: System.String

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

The visible title text in a part control's title bar is set by the Title property. The title text also appears as part of the ToolTip text when you position your mouse pointer over the title bar of a WebPart control or other server control that appears in a WebPartZone zone.

The style of the title text is determined by the PartTitleStyle property of the zone that contains the part control.

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 standard subtitle that is appended to the title string. For details, see Subtitle.

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 Title to enable user personalization of the title.

The following code example illustrates the declarative use of the Title 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.

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

.NET Framework
Available since 2.0
Return to top