Export (0) Print
Expand All

WebPart.Title Property

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

Gets or sets the title of a part control.

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

public override string Title { get; set; }
/** @property */
public String get_Title ()

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

public override function get Title () : String

public override function set Title (value : String)

Property Value

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

If a developer assigns a value to the Title property, then that value determines all (or at least part of) the text in the control's title bar. 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 complete text displayed in a control's title bar is also affected by the Subtitle property. If that property has a value assigned to it, the value is concatenated to the title. If no value is assigned to the Title property, a calculated title is displayed. At any point, developers can retrieve the actual, total text displayed in a WebPart control's title bar by getting the value of the DisplayTitle property.

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

For a code example that demonstrates the use of the base property, see the Title property.

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

© 2014 Microsoft