Let's say I get the source code of some page (e.g. http://example.com ). Now I want to write this source code to WebBrowser using something like:
myWebBrowser.Navigate("about:blank");
myWebBrowser.Document.Write(sourceCode);
Now suppose there is a relative URL on the Example.com homepage, for example:
<img src="/logo.gif" />
WebBrowser will try to download it from about:blank/logo.gif. I want to tell WebBrowser that "current address" http://example.com, so that it uses instead http://example.com/logo.gif.
Writing directly to the Url WebBrowser property will cause navigation (), which will get rid of the text that I wrote.
I am looking for a solution that works for other elements as well, such as stylesheets, javascript (e.g. <script language="text/javascript" src="myscript.js">), links, etc., and not just images.
Is it possible?