Problem with image path of html files viewed by webbrowser control

Posted by Royson on Stack Overflow See other posts from Stack Overflow or by Royson
Published on 2010-04-21T10:31:43Z Indexed on 2010/04/21 12:43 UTC
Read the original article Hit count: 361

Filed under:
|
|
|
|

I have an webbrowser control on my form. I am able display html files in that control. But my page contains some images if i give absolute path to it then images are displayed. But if i give relative path then images are not shown in the pages.
I have HtmlPages folder located at bin folder.
And i am assigning

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

If i assign D:\myapp\bin\HtmlPages\file.png then there is no problem. My images are stored in same folder. If i open html files with webbrowser then images are displayed.
What is the correct path to set ??

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms