Assembly: System.Web (in System.Web.dll)
[<PersistenceModeAttribute(PersistenceMode.InnerProperty)>] abstract HelpVerb : WebPartVerb with get [<PersistenceModeAttribute(PersistenceMode.InnerProperty)>] override HelpVerb : WebPartVerb with get
The following code example demonstrates the use of the WebPartZone control.property on a
For the code example to work, in addition to the following code, you need a custom WebPart control. You can either use your own control, or use the code for the custom TextDisplayWebPart control found in the Example section of the WebPart class overview.
This code example includes a user control to enable you to change display modes on a Web page. For more information about display modes and the source code in this control, see Walkthrough: Changing Display Modes on a Web Parts Page.
This code example also includes an HTML page that could contain 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 that hosts the TextDisplayWebPart control.
<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 code example also includes the following partial class that contains the code to handle the events in the .aspx page.
The other part of the code example is the .aspx page that hosts the TextDisplayWebPart control and demonstrates the use of the property. Notice that near the top of the page, an <@ Register %> declaration is used to reference the compiled TextDisplayWebPart control, which should be placed in a subfolder named Bin.
Also note that theproperty is used declaratively on the <asp:WebPartZone> element to set the text for the verb, as shown in the following code example.
Finally, note in the following code example that the HelpUrl property is set on the <aspSample:TextDisplayPart> element to provide the URL to the Help file.
After you load the page in a browser, click the Catalog Mode menu item in the Display Mode drop-down list control to switch the page into catalog display mode. Add the TextDisplayWebPart control to the page, close the catalog, and return the page to normal browse mode. If you click the verbs drop-down menu in the title bar of the TextDisplayWebPart control, you can access the help verb to open the Help page.
Available since 2.0