How to read an existing html file in the WebBrowser control in WP7?
I have tried:
Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("abc.htm"); StreamReader reader = new StreamReader(stream); string html = reader.ReadToEnd(); Browser.NavigateToString(html);
Browser.Navigate(new Uri("abc.htm", UriKind.Relative));
var rs = Application.GetResourceStream(new Uri("abc.htm", UriKind.Relative)); StreamReader sr = new StreamReader(rs.Stream); string html = sr.ReadToEnd(); Browser.NavigateToString(html);
All three are not working. The methods 1 and 3 gives NullReferenceException because the stream returns null, basically it is not reading my html file.
What is the problem here? How can i fix it?