Uri currURI = new Uri(currentPageToLoad, UriKind.Relative);
ExtrasHTMLbrowser.Navigate(currURI);
The above code basically is grabbing a string (currentPageToLoad) and making a URI. Then my web browser, ExtrasHTMLbrowser, is trying to navigate to the URI. When currentPageToLoad is something like “author.html” it works perfectly, and navigates to the html page.
However, the problem I am having is that when the html file is in a folder such as HTML, it won’t navigate properly. So, when currentPageToLoad = “HTML/author.html” the phone will give me the generic 404 not found page.
Any Idea why it would matter if the file was in a folder, or am I trying to access the file incorrectly?
Any help is greatly appreciated, thanks!
-Mark
Set the
HTMLfile to build typeContent.Then do this:This will read the entire HTML file as a string. You can then use the WebBrowser control’s
NavigateToStringmethod like this:If you have images/CSS you want to use, then you’ll have to use the above method to read the HTML file as a string and save it into Isolated Storage, alongside the images and CSS files (with matching directories).