Sometimes we require to show the print dialog on as soon as we load the Web Page, the following piece of script can achieve the same, simply paste the script block on the page and you will see the Windows print dialog when you load the webPage. <script type="text/javascript"> function PrintWindow() { window.print(); CheckWindowState(); } function CheckWindowState() { if(document.readyState=="co... { window.close(); } else { setTimeout("CheckWindowStat... 2000) } } PrintWindow(); </script> ......
using System; using System.Web; using CDO; using System.Text; using System.Runtime.InteropServi... using System.Web.Mail; using ADODB; namespace Venetian.Portal.BO.ContentM... { public class SaveFile { //private ctor as our methods are all static here private SaveFile() { } public static byte[] SaveWebPageToMHTFile(string url) { //bool result = false; CDO.Message msg = new CDO.MessageClass(); byte[] byteArray; ADODB.Stream stm = null; try { msg.MimeFormatted = true; msg.CreateMHTMLBody(url, ......