webBrowser.DocumentText and display images

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello!
I use DocumentText property to display my web content. If it contains image
then webBrowser doesn't display it.
How can I display images with using DocumentText property ?
Thanks for help.
Sebastian.
 
If you're using the DocumentText property to assing some html to the
WebBrowser control, keep in mind that the controls at this point doesn't have
any clue of what the base url for the html was used. So if you want to show
images make sure that the src attribute has the full url value. If it is a
local file the url should look like that:

<img src='file://\Windows\msn.gif' />

and if it is a file on the web server it must have server name and a path i.e.

<img src='http://contoso.com/images/ms.gif' />
 
Back
Top