Dim strScript As String = "<script language=JavaScript>" strScript += "window.print();"
Quote:Please explain your requirements a little clearly. From what I gather, your getting stuff like "http://www.mysite.com/somepage.aspx", "page 1/1" and the date int the page header/footer after printing. Is this right? If so, [as i said before], it is NOT POSSIBLE to control the output (or remove) the header/footer from asp.net. It is entirely dependant on the browser's page layout settings. You CAN NOT change that. If you use window.print(), those texts will be in the print unless the user changes their browser's settings. If you don't want them, you have three options: 1. Request user to change their browser settings (impractical) 2. Use a reporting plugin / printing plugin. 3. Give them output in pdf format using something like itextsharp. I hope you understand.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)