I am coding a project in C# and it contains a web browser control. The control points to a location within the install directory and to a help page coded in HTML.
However, I cant just put "/help/help_document.htm" into the address because I get an error that the argument is invalid.
However, I AM able to just type in something like:
System.IO.Directory.GetCurrentDirectory() + "\\help\\xPC Usage.htm"
by hand and it works fine. However, every time I click on the element, or REgenerate the code, it gets rewritten to VisualStudio's crappy,broken way of doing it.
Is there any way to lock the source code and keep VS out, or maybe just a way to get the webbrowser control to actually look for the page correctly.
EDIT: Here is a clarification. This works as an argument and gives me what I want:
this.webBrowser1.Url = new System.Uri(System.IO.Directory.GetCurrentDirectory() + "\\help\\xPC Usage.htm", System.UriKind.Absolute);
But the application always wants to rewrite it to this:
this.webBrowser1.Url = new System.Uri("C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\IDE\\help\\xPC Usage.htm", System.UriKind.Absolute);
What a douche....
This post has been edited by killnine: 20 August 2007 - 11:46 AM