Error 1 'System.Windows.Forms.WebBrowser' does not contain a definition for 'document' and no extension method 'document' accepting a first argument of type 'System.Windows.Forms.WebBrowser' could be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\clone1018\My Documents\Visual Studio 2008\Projects\AxximPHP\AxximPHP\Form1.cs 28 24 AxximPHP
Thats the error I get. Any clues?
private IHTMLDocument2 doc;
private void Form1_Load(object sender, EventArgs e)
HTMLEditor.DocumentText = "<html><body></body></html>"; //This will get our HTML editor ready, inserting common HTML blocks into the document
//Make the web 'browser' an editable HTML field
doc = HTMLEditor.document.DomDocument as IHTMLDocument2;
doc.designMode = "On";
//What we just did was make our web browser editable!
A couple years later for anyone still trying something like this out. If you are also creating a richedit control to work with the code, turning on the "AllowNavigation" to True will stop the following annoyance:
"This document has been modified. Do you want to save changes?"
"Yes: Saves your changes"
"No: Discards your changes"
"Cancel: Keeps this document open"