Differences setting content in Forms.WebBrowser control via DocumentText vs. Url
Posted
by jeffamaphone
on Stack Overflow
See other posts from Stack Overflow
or by jeffamaphone
Published on 2009-04-06T16:17:04Z
Indexed on
2010/05/24
12:41 UTC
Read the original article
Hit count: 265
If I generate some HTML and have it in a string and then say:
myWebBrowser.DocumentText = string;
It seems to work just fine, except none of the images load (I get the broken image graphic).
If, however, I write the string to a file and then say:
myWebBrowser.Url = new Uri("file://myfile.html");
Everything works just fine.
My question is, what's going on under the covers here that is different? I've verified in both cases that the path to the images (via RClick->View Source) is the same and that all the images do, indeed, exist.
In both cases the HTML is exactly the same.
Any light that could be shed on this would be appreciated. Thanks!
© Stack Overflow or respective owner