I USED THIS CODE IN ASP.NET WEB
<script type="text/javascript">
function PrintElem(elem) {
Popup($(elem).html());
}
function Popup(data) {
var mywindow = window.open('', 'div1', 'height=800,width=1200');
mywindow.document.write('<html><head><title></title>');
/*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
mywindow.document.write('</head><body >');
mywindow.document.write(data);
mywindow.document.write('</body></html>');
mywindow.print();
mywindow.close();
return true;
}
</script>
<input type="button" value="PRINT" onclick="PrintElem('#div1')" /
THIS IS WORKING IN GOOGLE CHROME BUT NOT WORKING IN IE8