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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…