Reputation: 13506
I have an XML file stored in the DEBUG folder inside the BIN Folder of my Application (BIN\DEBUG\File.xml)
When i call WebBrowser1.Navigate("File.xml");
It doesn't update the view with the display of the file. I know it's something to do with it not locating the file due to the folder location being incorrect. The file has to be accessed from this folder location.
Help appreciated
Upvotes: 1
Views: 2756
Reputation: 11652
webBrowser1.Navigate(Environment.CurrentDirectory + @"\File.xml");
This is what I use, if the directory hasn't been changed, ofcourse. :)
Upvotes: 0
Reputation: 20757
Do you have WebBrowser1.AllowNavigation set to true? Have you tried:
WebBrowser1.Navigate(Path.Combine(Application.StartupPath, "File.xml"));
Upvotes: 3