How to Use HTML Help Viewer in Your ASP.NET Web Application?

Whatever application you develop, success of the application lies with the Users. Users have to be comfortable in accessing the application. That is accomplished by providing easily understandable help manual of the application to the User. Basically there are three different ways of providing help in your ASP.NET application. They are mentioned below:

• Provide ToolTip for HTML controls and server controls used in the application
• Create your own HTML pages and display them in the browser window
• Use HTML Help Viewer to display detailed help for your application

This article will focus on the third option – using HTML Help Viewer to display help.
What is HTML Help Viewer?

HTML Help Viewer is provided by Windows. Many tools and applications are using this help viewer to create their own customized help. For example, open Internet Explorer. In the Help menu, click on “Contents and Index”. You will see a help document as shown below:

This help document is an HTML Help Document constructed using HTML Help Workshop. You can construct similar help in your ASP.NET Web Application and you can define your application related topics and contents.

How to Display Your Content in HTML Help?
You have to use showHelp method to display your content in HTML Help Viewer. If you prefer to specify either a web form or html page which contains the help details, then you can do it using the following line of code:

<a href="#" onclick="window.showHelp('helpContent.aspx')">Help</a>

When User clicks on “Help” link, content available in “helpContent.aspx” will be displayed in a window displayed over your web application. This is a simple approach but not so formal.

To provide advanced help features like Index and Search options and to provide elaborative help contents, use HTML Help Workshop. Basic steps to be followed to achieve the same are mentioned below:

• Download and Run HTML Help Workshop.
• Create a new project in HTML Help Workshop using the wizard that appears.
• After mentioning the project name, “Window Types” dialog appears. It has multiple tabs.
• Use “General” tab to create a window to display your help document.
• Use “Buttons” tab to choose the buttons to be displayed in your help window. Buttons that are provided in HTML Help Workshop are Hide/Show, Back, Forward, Stop, Refresh, Home, Options, Print, Locate, Jump 1, Jump 2. “Jump 1” and “Jump 2” are user-defined buttons. Decide which all buttons are appropriate for your hemp window.
• Specify the size and location of your help window using “Position” tab.
• Use other related tabs to record corresponding options to define your help window.
• Click “New” in the File Menu. Select “HTML File”. Click “OK”. Compose your HTML File and compile it.
• Now create help documents for individual topics as HTML Pages.
• Compress all of these documents into a single file with extension “.chm” using HTML Help Workshop.
• Specify the compressed file name in your code to display it on click of Help link.

<a href="#" onclick="window.showHelp('E:\\testHelpFolder\\testHelpFile.chm')">

'E:\\testHelpFolder\\testHelpFile.chm' is the file name along with its absolute path. You can specify your own file name inside window.showHelp method.

• When User tries to access help, the compressed file has to be downloaded into user’s machine.
• When User clicks on a particular content topic, the context id mapped to the content topic file name is accessed by showHelp method and the corresponding content gets displayed.

If you want to read or write contents into .chm file, you have to use IStorage Interface. Moreover when the size of the compressed file is huge, HTML Help Workshop helps you to split the .chm file into many files. Each file belongs to a different file system and contains specific file content of the compressed file. Here is a list of those file extensions and the content they will hold.

• .chm File: Main help file that can contain all the contents, if size is not an issue.
• .chi File: System files available in .chm file can be stored with extension as chi.
• .chq File: Details regarding the search index (for the search pane in the HTML Help Viewer) for your help document is stored in this file.
• .chw File: Help index used to display and perform activities in “Index” pane of HTML Help Viewer is stored in this file.

Benefits of Using HTML Help with Compressed File (.chm):

• HTML Help will populate “Contents” window as well as the content selected in the right pane of the window at the same time.
• All help documents are HTML Pages and are compressed using HTML Help Workshop. Hence the consolidated help document is of reasonable size and loading will be faster.
• HTML Help Workshop provides tools for constructing Index and Search options thereby User can arrive at help for a specific topic without much browsing.
• You can write and compile help document in different languages and perform localization easily.

Limitations in Using HTML Help with Compressed File (.chm):

• HTML Help can contain only HTML Pages and not any other page types like web forms.
• Help Document has to be saved in User machine for accessing it. Hence if the file content is large, it takes some time to download. Once downloaded, accessing will be faster and easier.

|How and Why to Use Trace Option for Debugging in ASP.NET Application | How to Display Tool Tip in Your ASP.NET Web Application | How to Use “const” Class Member Modifier in C# | How to Use HTML Help Viewer in Your ASP.NET Web Application | List of Preprocessor Directives Available in C# | More about #define, #undef and Conditional Compilation Directives in C# |Understanding Different Class Member Modifiers in C# | Understanding of Diagnostic Directives and #pragma, #line, #region, #endregion Directives in C# | Usage of Roles API to Perform Authorization in .NET| What are the Different Compiler Engineering Techniques|Writing Unsafe Code in C#|


“Amazon and the Amazon logo are trademarks of, Inc. or its affiliates.”

| Privacy Policy for | Disclosure | Contact |

Copyright - © 2004 - 2024 - All Rights Reserved.