title: WebBrowser.Document.Body is always null
body: <p>I have a <code>WebBrowser</code> document set to be in edit mode. I am trying to manipulate the inner text of the body element by using <code>WebBrowser.Document.Body.InnerText</code>, however, <code>WebBrowser.Document.Body</code> remains null.</p>
  
  <p>Here is the code where I create the document contents:</p>
  
  <pre><code>private WebBrowser HtmlEditor = new WebBrowser();
  public HtmlEditControl()
  {
      InitializeComponent();
      HtmlEditor.DocumentText = "&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;";
      myDoc = (IHTMLDocument2)HtmlEditor.Document.DomDocument;
      myDoc.designMode = "On";
      HtmlEditor.Refresh(WebBrowserRefreshOption.Completely);
      myContentsChanged = false;
  }
  </code></pre>
  
  <p>I can edit code and everything fine, but I don't understand why <code>HtmlEditor.Document.Body</code> remains null. I know I could always just reset the document body whenever I need to load text into the form, but I would prefer to understand why this is behaving the way it is, if nothing else then for the knowledge.</p>
  
  <p>Any help on this is greatly appreciated.</p>