Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a scenario where there are 3-4 textboxes on aspx page and a print button.
My requirement is to save values of textboxes in database if user actually prints that page.


I am using Window.Print for printing that page. But How would I know if user has clicked in print button or Cancel button afterwards.

Thanks in advance,
Posted
Comments
Graham Breach 27-Jan-14 9:19am    
You can't know that - you also won't know if the user saved the printout as a PDF, or if the print job doesn't make it to the printer, or if the printer jams or is out of ink.

1 solution

You can't have any control of user's activity once Print Preview Dialog is opened.

However, you can do something, when the Print Button on your page is clicked. Do something on Print Button Click event and after that, call window.print().
 
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