Click here to Skip to main content
13,089,943 members (47,040 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I am currently working on an implementation of a local help system with links which are in the following format:


However when the user clicks the button which loads this, it only loads up to the # symbol and doesn't show the rest. The path shown in the browser is file:///D:/Folder/Default.htm. I've tried internet links with the # symbol in and they're fine, it's just links to local files which don't work. Can anyone offer an alternative library to use so I can use it in this way?
Posted 25-Sep-12 3:32am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I can confirm it. At least this is how it works with start issued from the Shell with Mozilla SeaMonkey browser of the most recent version, with Windows 7. It looks like the anchor is ignored.

Interestingly, if I use the Web browser application file directly, it works correctly. For example, this should work:
string browser = //...; path name of the browser application
string commandLine = "file:///D:/Folder/Default.htm#Product.htm";
System.Diagnostics.Process.Start(browser, commandLine);

I do understand that this solution is not very good, because it is not universal, but what you can do if we have such a defect in the Shell (because this example shows that the browser works correctly, so this a kind of defect in the Shell API, not the browser)?

You can improve it using the same code, only you would need to calculate the browser full path name out of the data retrieved from system Registry.


Use the Registry key:

Please see:[^].

See also this CodeProject article:
Read, write and delete from registry with C#[^].


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100