Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to print data directly from my web application to printer without displaying to the monitor in ASP.Net C#
Posted
Comments
Sandeep Mewara 5-May-12 10:56am    
Can I know what kind of scenario is it where you want to print something without even viewing? If it's a webpage or a new window, you can always print it out directly. Are you trying to hide the print trigger from user itself?
Zoltán Zörgő 5-May-12 16:49pm    
Since asp.net applications run in at least two tires: hosted in a web server (IIS) and in a browser (IE) on client side, there is a first line question: do you want to print from the client or from the server?
Dhanamanikandan 7-May-12 6:28am    
Sorry, I am not clear with your request!

Well, a very simple solution would be to hide the control by setting its visibility to false but using it to print the content.
Another option is to build the control dynamically in memory and then print it out (without displaying it anywhere).
 
Share this answer
 
use java script

JavaScript
function printp() {
  window.print();
  
}



and then call it

HTML
<body onload="printp()"></body>
 
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