Last post Jan 30, 2015 01:21 PM by gerrylowry
Jan 30, 2015 04:18 AM|itshunaid|LINK
Could any one please help me in converting .mht file to .html file using C#.Net Code.
Jan 30, 2015 01:21 PM|gerrylowry|LINK
(a) why would you want to do this?
(b) how many pages do you wish to convert?
(c) why were the pages saved as .mht in the first place?
(d) will more pages be added to the page(s) that you currently wish to create?
(e) do you mean just the .html or all of the page(s) content?
Here are some excerpts from http://www.whitehouse.gov/ :
<!-- saved from url=(0026)http://www.whitehouse.gov/ -->
in the above example, note the reference:
imagine that your .mht page was saved today and you attempt to convert it in one week from today; during that time, there exists the possiblity that the file "The White House_files/menu171.js" may have changed; if that happens, the page you decode in the
future will have subtle differences from the page that you saved today.
(f) are you hoping to exactly recreate your page(s)?
<meta http-equiv="X-UA-Compatible" content="IE=9">
most major current browsers are likely to more or less properly handle the above meta directive.
if you are trying to recreate pages correctly, you will need to understand directives like the one above.
<link rel="stylesheet" type="text/css" href="http://cloud.typography.com/6570712/721006/css/fonts.css">
a web page may also employ CSS
<span class="field-content">January 30, 9:30am</span>
<a href="http://www.whitehouse.gov/blog/2015/01/30/advance-estimate-gdp-fourth-quarter-2014">Advance Estimate of GDP for the Fourth Quarter of 2014</a>
Pages also contain dynamic content; the above snippet is from the "TOP NEWS" part of the page; the part of the page is guaranteed to change on a regular basis.
itshunaid, please clarify your goals in order to help your peers at forums.asp.net better answer your question.
Note: will this help? http://htmlagilitypack.codeplex.com/