How to set source path of image within html pages to show in webbrowser control

Posted by Royson on Stack Overflow See other posts from Stack Overflow or by Royson
Published on 2010-04-19T12:41:03Z Indexed on 2010/04/19 13:23 UTC
Read the original article Hit count: 343

Filed under:
|
|
|

Hi in my application there is web browser control to show some static html pages. The pages are displayed properly. but images are not displayed..
I tried with changing src-path but no success.
my htmlpages folder is located at bin folder. And i am assigning it as.

FileStream source = new FileStream(@"..\HtmlPages\supportHtml.html", 
    FileMode.Open, FileAccess.Read);

if i open html files in browser, the images are displayed properly..
So, What is the correct path for images..?? If i set full path to src attribute of <img> tag..it works. but i think its not a proper way. :(

EDIT:
If i assign d:\myapp\bin\HtmlPages\support.gif then image is displayed. And if i assign "..\HtmlPages\support.gif" or "support.gif" image is not shown.

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms