I have the following JavaScript print function that prints whatever inside my panel in ASP.NET:
function PrintPanel() {
var panel = document.getElementById("<%=pnlContents.ClientID %>");
var printWindow = window.open('', '', 'height=400,width=800');
printWindow.document.write('<html><head><title></title>');
printWindow.document.write('</head><body >');
printWindow.document.write(panel.innerHTML);
printWindow.document.write('</body></html>');
printWindow.document.close();
setTimeout(function () {
printWindow.print();
}, 500);
return false;
}
<asp:Button ID="btnPrint" runat="server" Text="Print" OnClientClick = "return PrintPanel();" Height="34px" Visible="False" Width="69px" />
The problem is, it is print the page link, date and the page number. is there a way I can hide them? I am thinking to make the text white so they do not show up, but still not sure here should I edit that, any suggestion are appreaciated. Thank you.