byte.eml文件是有圖像base64編碼值..我打算在瀏覽器中打開它...但這不是填充圖像文件.... plz幫助我出..需要打開一個圖像在網絡瀏覽器中打開
這是代碼...
昏暗OFILE由於有System.IO.File 昏暗俄瑞阿得斯作爲就是System.IO.StreamReader
orEAD = oFile.OpenText("E:\mailbox\P3_hemantd.mbx\byte.eml")
Dim content As String
content = ""
''Dim intsinglechr As Integer
''Dim csinglechr As String
While orEAD.Peek <> -1
content = content & Chr(orEAD.Read)
content = Replace(content, vbCrLf, "")
content = Replace(content, vbTab, "")
content = Replace(content, " ", "")
End While
Response.ContentType = "image/jpeg"
Response.BinaryWrite(Convert.FromBase64String(content))
其工作,但它產生但結果是出乎意料....例如 JFIF; CREATOR:GD-JPEG V1.0(使用IJG JPEG V62),質量= 85 C!「$」$ 我想寫它像...這給錯誤 Response.WriteFile(Convert.FromBase64String(content)) 錯誤。 類型'字節的1維數組'的值不能被轉換爲'字符串' 有一件事我希望你清除byte.eml文件只有基地64加密的圖像file.i嘗試它從diff實用程序轉換this工作.so需要asp.net編碼處理基於文件的解碼 – manish 2010-05-02 12:48:18