Reputation: 165
I want to load a local html file in webbrowser control in editable mode. My code for loading in html file in webBrowser is:
private void LoadFile(string filename)
{
using (StreamReader reader = File.OpenText(filename))
{
webBrowser1.DocumentText = reader.ReadToEnd();
reader.Close();
Text = webBrowser1.DocumentTitle;
}
}
But it is not editable.
Upvotes: 1
Views: 5621
Reputation: 1765
Please check this snippet.
webBrowser1.AllowWebBrowserDrop = false;
webBrowser1.Url = new Uri(@"D:\TEMP\sample.htm");
Upvotes: 2