IWebPart::Subtitle Property
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System::StringA string that serves as a subtitle for the control. The default value is an empty string ("").
The Subtitle property is used to return a default subtitle string for a WebPart control that is appended to the control's title in the title bar.
If you provide a default value for the Subtitle property in a control that implements the IWebPart interface, the Web Parts control set automatically appends it to the value of the Title property of the control at run time.
The following code example demonstrates declarative and programmatic use of the Subtitle 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 Subtitle property. Note that the property is read-only and is meant to be used to provide a default subtitle that is appended to the main title of a control.
The second part of the code example shows how the user control that implements the IWebPart interface is referenced in a WebPartZone control, and how the writable properties from IWebPart are set declaratively on the control. After you load the page in a browser, note that the default value of the Subtitle property, which was set in the user control's implementation code, is appended to the title in the control's title bar.
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.