Put your code in particular div or panel and call using id of that control this will print part of your html page.
<script language="javascript" type="text/javascript">
function Clickheretoprint() {var disp_setting = "toolbar=yes,location=no,directories=yes,menubar=yes,";
disp_setting += "scrollbars=yes,width=650, height=600, left=100, top=25";
var content_vlue = document.getElementById('<%=dvPrintXL.ClientID %>').innerHTML;
var docprint = window.open("", "", disp_setting);
docprint.document.open();
docprint.document.write('<html><head><title>Print Page</title>');
docprint.document.write('</head><body><center>');
docprint.document.write(content_vlue);
docprint.document.write('</center></body></html>');
docprint.print();
docprint.document.close();
docprint.focus();
Hope this will help you.
Don't forget to mark as answer if it helps. :)