WebPart.HelpUrl Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the URL to a Help file for a WebPart control.

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

[ThemeableAttribute(false)] 
public:
virtual property String^ HelpUrl {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_HelpUrl ()

/** @property */
public void set_HelpUrl (String value)

public function get HelpUrl () : String

public function set HelpUrl (value : String)

Property Value

A string that represents the URL to a Help file. The default value is an empty string ("").

To enable a verb menu with a help verb in the verbs menu of a WebPart control, you must provide a value for the HelpUrl property. The manner in which the Help content is displayed in the browser is determined by the value of the HelpMode property.

This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins Overview.

The personalization scope of this property is set to Shared and can be modified only by authorized users. For more information, see PersonalizableAttribute and Web Parts Personalization Overview.

The following code example demonstrates the use of the HelpUrl property. This example assumes the use of a custom control, TextDisplayWebPart, which is found in the Example section of the WebPart class overview.

The code example also includes an HTML page that contains fictitious Help content for the TextDisplayWebPart control. For this example to work, you must save the following code in a file named Textwebparthelp.htm and place it in the same directory of your site as the .aspx page.

<html>
<head runat="server">
    <title>Text Content WebPart Help</title>
</head>
<body>
  <div>
  <h1>Text Content WebPart Help</h1>
  To make the WebPart control work...
  </div>
</body>
</html>

The final part of the example is a Web page that shows how to reference the TextDisplayWebPart control. Note that in the declarative markup, the HelpMode property value is set to Navigate, and the code also sets the value of the HelpUrl property to the name of the HTML file that contains the Help content. Load the page into a browser, and click the help verb on the verbs menu of the WebPart control.

No code example is currently available or this language may not be supported.
<%@ page language="VJ#" %>
<%@ register tagprefix="aspSample" 
             Namespace="Samples.AspNet.JSL.Controls" 
             Assembly="TextDisplayWebPartJSL" %>

<html>
<head id="Head1" runat="server">
</head>
<body>
  <form id="Form1" runat="server">
    <asp:webpartmanager id="WebPartManager1" runat="server" />
    <asp:webpartzone
      id="WebPartZone1"
      runat="server"
      backcolor="#99cccc">
        <parttitlestyle font-bold="true" forecolor="#ffffff" />
        <partstyle
          borderwidth="1px" 
          borderstyle="Solid" 
          bordercolor="#81AAF2" />
        <zonetemplate>
          <aspSample:TextDisplayWebPart 
            runat="server"   
            id="textwebpart" 
            title = "Text Content WebPart" 
            width="350px" 
            HelpMode="navigate"
            HelpUrl="TextWebPartHelp.htm" />
        </zonetemplate>
    </asp:webpartzone>
  </form>
</body>
</html>

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

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: