webBrowser.DocumentText and display images

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.
 
G

Guest

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' />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top