I have a htm page in my disk (C:\pages\page1.htm).
This page link CSS and gif (C:\pages\img\img1.gif, c:\pages\css\css1.css).
How can I generate MHT file ?? Only using C# .NET managed.
MHT is basically a MIME file, which means it's structured very much like an e-mail. There are some global headers at the top (namely, the Content-Type
, which also specifies the content boundary). Each file in the archive is separated by the content boundary, and has its own set of headers. See a MHT representation of this page - much of the content is self-explanatory.
Why do you need this? MHT is IE-only format of storing webpages.
However, if you will open one MHT, you will quickly get an idea how to create it by hands.