You could just open the directly using it's whole path. This can be done using this code:
var path = Path.Combine(Environment.CurrentDirectory, @"Website\index.html");
Browser.Navigate(path);
It takes the current directory of your program and appends the relative path of your file to it. Then it passes the resulting absolute URI to the WebBrowser.
Note however that this will work only if you change the properties of the folder so that all files inside will be marked as Copy to Output Directory
. First you select all the files – only files, not folders! – in the Solution Explorer, then in Properties find Copy to Output Directory
and set it either to Copy always
or Copy if newer
. This will ensure that all the files get copied to the bin
folder, from which your program gets executed.