Put the content to be printed inside the div tag
Your Content
Then write the Javascript function which will take the name of this div as input and then will print it.
function CallPrint(var strid)
{
var prtContent = document.getElementById(strid);
alert(prtContent);
var WinPrint = window.open('','','letf=10,top=10,width="450",height="250",toolbar=1,scrollbars=1,status=0');
WinPrint.document.write("<html><head><link rel="\"stylesheet\"" href="\"css/print.css\"" media="\"print\""><link rel="\"stylesheet\"" href="\"css/print.css\"" media="\"screen\""></head><body>");
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.write("</body></html>");
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
return false;
}</link></link>
Call CallPrint('printDiv');"
on onclick() of button or use below:
Button.Attributes.Add("OnClick", "return CallPrint('printDiv');");
Here Button referes to the name of the button on click of which you want to print the content.
Hope this helps.
All the best.