How to open "file://D:/help.html#selclass" with default browser in C# [duplicate]
Possible Duplicate:
How to open in default browser in C#
How to open "file://D:/help.html#selclass" with default browser in C#, is there any example?
Thanks Dma
Process.Start("file://D:/help.html#selclass");
var p = Process.Start(@"D:\help.html");
while (!p.HasExited) Thread.Sleep(10);
// carry on
You could:
- Create a temporary
.URL
file (see here for instance) that features#selclass
in the URL. - Open the
.URL
usingProcess.Start(...)
. - Delete the temporary
.URL
file.
I got default browser firstly through register table; and then call
Process.Start(browser, url);
It works
精彩评论