This documentation is archived and is not being maintained.

WebPartManager::GetDisplayTitle Method

Gets a string containing the value for the DisplayTitle property of a WebPart control.

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

protected public:
virtual String^ GetDisplayTitle(
	WebPart^ webPart
)

Parameters

webPart
Type: System.Web.UI.WebControls.WebParts::WebPart

The control for which the method returns the value of DisplayTitle.

Return Value

Type: System::String
A string that contains the calculated value of DisplayTitle for webPart.

ExceptionCondition
ArgumentNullException

webPart is nullptr.

ArgumentException

webPart is not in the Controls collection.

Gets the calculated value of the DisplayTitle property for webPart. When developers do not assign a value to the Title property of a WebPart control, this method produces the value to display as the title. The calculated value for untitled controls consists of a number appended to a string, with the number indicating a control's sequence within the current zone.

Notes to Inheritors:

This method can be overridden to change how the default display title is calculated.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: