This documentation is archived and is not being maintained.

WebPartHelpMode Enumeration

Specifies the available types of user interfaces (UIs) for displaying Help content for a WebPart control.

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

public enum WebPartHelpMode

Member nameDescription
ModalOpens a separate browser window, if the browser has this capability. A user must close the window before returning to the Web Parts page.
ModelessOpens a separate browser window, if the browser has this capability. A user does not have to close the window before returning to the Web page.
NavigateReplaces the Web Parts page in the browser window.

The HelpMode property is used to determine how a browser will display Help content for a control. The WebPartHelpMode enumeration contains values that can be applied to the HelpMode property. The default value for the HelpMode property is Modal.

The following code example demonstrates the use of the HelpMode property to display Help for a control in the same browser window. The first part of 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.

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

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.

<%@ page language="C#" %>
<%@ register tagprefix="aspSample" 
             Assembly="TextDisplayWebPartCS" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" >
<head id="Head1" runat="server">
    <title>ASP.NET Example</title>
  <form id="Form1" runat="server">
    <asp:webpartmanager id="WebPartManager1" runat="server" />
        <parttitlestyle font-bold="true" forecolor="#ffffff" />
          bordercolor="#81AAF2" />
            title = "Text Content WebPart" 
            HelpUrl="TextWebPartHelp.htm" />

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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