Why does the WebBrowser control not display HTML correctly after it has been saved?
<p>I've read a lot of related answers but I still don't see the problem. I think <strong>MY</strong> problem is that I don't have a good grasp of the basics of HTML and potentially javascript. I'm talking about how they are stuck together and operate, not the particular language syntax. Perhaps somebody could give me the big picture explanation of what is going wrong here.</p>

<p>I'm using a simple WebBrowser control to navigate to a web page. This results in everything displaying correctly. Now, I'd like to save that HTML content locally on the machine and open it again later, then render it in another WebBrowser control. This has not worked so far. The page renders briefly but without images and effects, then I get an exception regarding scripts. So I decided to do a very simple test. I would get the HTML from the browser, then immediately read that text back into the browser. </p>

<p>After navigating to the page successfully, I get the HTML text as follows:</p>

<pre><code>string html = myWebBrowser.DocumentText;
</code></pre>

<p>I then immediately set the DocumentText property to its original value.</p>

<pre><code>myWebBrowser.DocumentText = html;
</code></pre>

<p>This gives me the same error and effect as if my other application was reading the saved HTML. So what is going on here? The browser initially shows all content successfully but then extracting and reloading the HTML text breaks it all. I must be missing a very obvious and basic concept here. Is it that the WebBrowser control's DocumentText property does not actually return the original HTML code, but rather a modified version? Or is it that setting that property modifies something? Is it neither? Thanks to anyone who can sort out my understanding of how all this works.</p>