How to load mht from stream/string into a WebBrowser control?

前端 未结 3 1209
太阳男子
太阳男子 2020-12-19 20:46

The WebBrowser control loads properly any mht file if I use the Navigate method, but when I use the DocumentText or DocumentStre

3条回答
  •  暖寄归人
    2020-12-19 21:13

    in vb.net we've used

    Response.ContentType = "message/rfc822" 
    Dim ByteDocBlob() As Byte = cwWebUtil.ConvertLocalFileToByteArray(FilePath, True)
    Dim HTMLText As String = System.Text.Encoding.UTF8.GetString(ByteDocBlob)
    Response.Write(HTMLText)
    Response.End()
    

    Problem is only IE seems to accept it.

提交回复
热议问题