WebPartManager::GetDisplayTitle Method (WebPart^)
Gets a string containing the value for the DisplayTitle property of a WebPart control.
Assembly: System.Web (in System.Web.dll)
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.
| Exception | Condition |
|---|---|
| ArgumentNullException | webPart is null. |
| 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.
Available since 2.0