Click here to Skip to main content
15,922,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear sir,
how to send print request whene click on button...
i want to do print page on paper whene i click on button...
plz help...
Posted

<pre lang="cs">function printThis() {
window.print();
}</pre>


<asp:button onclick="printThis();" xmlns:asp="#unknown">
 
Share this answer
 
Comments
Rajkumar_007 2-Apr-14 5:37am    
its give an error on button onclick event...
Rajkumar_007 2-Apr-14 5:54am    
Thank you sir...:)
XML
<script type="text/javascript">
window.print();
</script>

this will work when new page open or redirected if you want to call on button click then you make a javascript function and call on onclick event on button click.
 
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