Export (0) Print
Expand All

IWebPart::TitleUrl Property

Gets or sets a URL to supplemental information about a WebPart control.

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

property String^ TitleUrl {
	String^ get ();
	void set (String^ value);
}

Property Value

Type: System::String
A string that represents a URL to more information about a WebPart control. The default value is an empty string ("").

When you assign a URL to the TitleUrl property, the title of the control becomes a link. The purpose of this property is to provide a convenient way for end users to access additional information about a control. The additional information could provide copyright data, contact data, details about the creator of the control, or a summary of the control's purpose.

NoteNote

Normally, you would not use the TitleUrl property to link to Help content. The best way to provide a link to Help for a control is to use the HelpUrl property.

The following code example demonstrates declarative and programmatic use of the TitleUrl 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 TitleUrl property.

No code example is currently available or this language may not be supported.

The second part of the code example demonstrates the method in the user control that programmatically sets the value of the TitleUrl property when a user selects the appropriate property name from the radio buttons on the page, sets a new value in the text box, and then clicks the Update button.

Security noteSecurity Note

This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

No code example is currently available or this language may not be supported.

The third part of the code example shows how the user control that implements the IWebPart interface is referenced in a WebPartZone control, and how the TitleUrl property is set declaratively on the control. Note that if you do not provide a URL to a real page, and then a user clicks the link in the title bar, an error message appears.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

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.

Show:
© 2014 Microsoft