I need help in displaying HTML File in webbrowser in Windows phone 7 app.
I've an html file in my wpf-silverlight project as resource. Now When the user click on Help button in my App, i need to display this HTML in webbrowser.
Here is the code, which is giving me an error -
webBrowser1.Navigate(new Uri("AppHelp.html",UriKind.Relative))
But, if i use this code, It's loading fine
webBrowser1.Navigate(new Uri("http://mywebsite.com/AppHelp.html",UriKind.Relative))
Please help!
I've change code like this now, but now i'm getting this error:Invalid URI: A Port is signaled with ':' but could not be parsed.
Uri uri = new Uri(@"pack://application:AppHelp.html", UriKind.Absolute);
Stream stream = Application.GetResourceStream(uri).Stream;
using (StreamReader reader = new StreamReader(stream))
{
// Navigate to HTML document string
this.webBrowser1.NavigateToString(reader.ReadToEnd());
}