I want to print the page in C#/ASP.NET 2.0, but the problem is when i use following javascript code, it prints the whole page.
function printMe()
{
window.print();
document.getElementById("printed").value = "YES";
document.getElementById("form1").submit();
}
<form id="form1" runat="server">
<input type="button" value="Print me" onclick="printMe();" />
<input type="hidden" id="printed" />
I don't want to print the complete page but i just want to print the contents of the page only.
Do anybody have any idea?
Thanks in advance