Assembly: System.Web (in System.Web.dll)
Use the property optionally to return a standard subtitle string in your custom WebPart control that will be appended to the control's title.
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
To supply a subtitle for instances of a custom WebPart control, you must override the property.
The following code example demonstrates how to provide a subtitle for instances of a custom WebPart control.
The first part of this example contains the code for a custom control named TextDisplayWebPart. This control is the same as the custom control which is found in the Example section of the WebPart class overview, except that it also overrides the property to provide a standard subtitle containing a fictitious company name for instances of the custom control. For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. This code example assumes that you compile the source code into an assembly, place it in a Bin subfolder of your Web application, and reference the assembly with a Register directive in your Web page. For a walkthrough that demonstrates both methods of compiling, see Walkthrough: Developing and Using a Custom Web Server Control.
The second part of the example is a Web page that shows how to reference the TextDisplayWebPart control in an ASP.NET Web page. After you load the page in a browser, the control's title bar text includes the title assigned to the control in the declarative markup, a hyphen separator, and the value of the custom subtitle from the TextDisplayWebPart control.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.