Using C#, Unable to load properly .mht document content in html string. .MHT Content is not in proper format -
using c#, unable load .mht document content in html string processing download pdf file. after downloading .mht content not in proper format. bb contains byte array .mht file attachment.
byte[] bb = new byte[0]; attachmentstring = attachmentstring + "<br clear=\"all\" style=\"page-break-after:always\" />"; attachmentstring = attachmentstring + "<center><table border=\"0\"><tr><td>" + attachments[a].description.trim() + "</td></tr></table></center><br/>"; bb = helpers.decryptafile(path); //string messagestring = string.empty; //foreach (byte b in bb) //{ // messagestring += (char)b; //} string mht = ""; memorystream stream = new memorystream(bb); streamreader streader = new streamreader(stream, system.text.encoding.ascii); mht = streader.readtoend(); attachmentstring += "<div>" + mht + "</div>";
Comments
Post a Comment