Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi How to open help file from Asp.net when click F2 or asp button click event with specific topic or content.

In windows application got HelpProvider F1 control and using this code can open specific topic or specific content of the help.

VB
Dim hlpProvider As HelpProvider
hlpProvider = New System.Windows.Forms.HelpProvider()

' Help file
hlpProvider.HelpNamespace = "helpFile.chm"
hlpProvider.SetHelpNavigator(TextBox1, HelpNavigator.TableOfContents)


But how open .chm file with specific topic and without download option from browser or any other way to open help file which in different format, other than .chm file.

What I have tried:

I am try to open in this way,but it download and if open ,it open 1st topic always.This is my code in client side.

document.onkeyup = KeyCheck;

function KeyCheck(e) {
var KeyID = (window.event) ? event.keyCode : e.keyCode;
if (KeyID == 113) {

window.open("help/Test.chm", "_self");

}
}

And in server side i try with this code,nothing happen
C#
Dim p As New Process()
p.StartInfo.FileName = "ms-its:file:///" + System.Web.HttpContext.Current.Server.MapPath("Test.chm") +
p.Start()
Posted
Updated 4-Sep-16 17:35pm

1 solution

Simple, you don't.

First, ALL ASP.NET CODE RUNS ENTIRELY ON THE SERVER, not the client. Starting a Process will start it on the web server only. It will not start on the client machine.

Next, the only way you could possibly use a .CHM help file is if it was downloaded to the client machine. I've never seen a CHM file used on any website ever. This is probably because all resources and files on a client machine are off-limits to code running in a browser.

I have no idea what you intend to provide help for, but a CHM file is probably not going to be your best bet in a web site.
 
Share this answer
 
Comments
Maciej Los 5-Sep-16 15:45pm    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900