Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to print the Asp.Net Webpage

Please help. THANKS.
Posted
Comments
Yogi ,Pune 29-Dec-12 2:06am    
Thanks

<div id="DivSample"> 
Html containt for Print.

</div>

JavaScript
<script src="~/jquery.jqprint.0.3.js" type="text/javascript"></script> 


<script language="javascript" type="text/javascript">
    function Print() {
        var o = $("#DivSample");
        o.jqprint({ operaSupport: true });
    }
    </script>
 
Share this answer
 
XML
<button onclick="printPage()">print</button>
<div id="printerDiv" style="display:none"></div>
<script>
   function printPage()
   {
      var div = document.getElementById("printerDiv");
      div.innerHTML = '<iframe src="mypage.aspx" onload="this.contentWindow.print();"></iframe>';
   }
</script>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900