How To print asp page

Posted by Gksteja under ASP.NET on 11/8/2012 | Points: 10 | Views : 886 | Status : [Member] | Replies : 2
Hi..
please give the code for print aspx page through c# coding...




Responses

Posted by: Yuvaopens on: 11/8/2012 [Member] Starter | Points: 25

Up
0
Down
We can't get u.... What u really need with scenario.....

Yuvaraj.S

Gksteja, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vivekjj on: 11/9/2012 [Member] Starter | Points: 25

Up
0
Down
<script language="JavaScript" type="text/javascript">

function printPartOfPage(elementId)
{
var printContent = document.getElementById(elementId);
var windowUrl = 'about:blank';
var uniqueName = new Date();
var windowName = 'Print' + uniqueName.getTime();
var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=0,height=0');
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
return true
}
</script>





If U satisfied with this code mark its answer to helping others

Gksteja, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response