How to load mht from stream/string into a WebBrowser control?
Posted
by
Sameh Serag
on Stack Overflow
See other posts from Stack Overflow
or by Sameh Serag
Published on 2011-01-16T11:48:42Z
Indexed on
2011/01/16
11:53 UTC
Read the original article
Hit count: 197
The WebBrowser control loads properly any mht
file if I use the Navigate
method, but when I use the DocumentText
or DocumentStream
properties, the source of the mht
file is displayed as if I opened the file in notepad.
If I write the stream to a temp file then Navigate to it, it works properly, but I don't want to do it this way.
This issue seems common, but I didn't find a working solution for it. Some people suggest I should fool IE by implementing IPersistMoniker
com interface, ...etc. I have tried with this a little bit, but unfortunately I got the same result. May be I have done something wrong. I still feel their should be a more straightforward solution (other than saving in a temp file first), any idea?
© Stack Overflow or respective owner