Printing in ASP.NET

  • Thread starter Thread starter Guy Cohen
  • Start date Start date
G

Guy Cohen

Hi all.
I have a form with some information that the user has to fill in.
At the end of the process I need to print a summary of the information.

What is the best way to print the data?
Maybe I should open a new page as the "invoice" ?


Please dont suggest window.print() :)

TIA
Guy
 
I have a form with some information that the user has to fill in.
At the end of the process I need to print a summary of the information.

What is the best way to print the data?
Maybe I should open a new page as the "invoice" ?

Grab the data server side, reformat it, send it back to the browser. Then
the end user can hit the PRINT button and print it.

Printing is really a browser function...not a function of ASP.net

-Darrel
 
Darrel
If it was simple - I could find the solution myself :)
I do not want to print the document but some other data that might be
calculated from the text the user inserted in the form.

Can I just print what ever i want to the printer?
like in vb : printer.print "sample"

TIA
Guy
 
No. You need to render anything you want to print in a browser window, then
window.print. Otherwise, you will need to download and install a component
on the client system

Jeff
 
You could use a print/screen specific styles so that you don't print what is
on screen but prints something not shown on screen.

In all cases you need to render what you want to print (even if not visible
on screen).
 
Jeff

I was thinking to do so
Can you please tell me how to create a new browser window (probably hidden)
and print it?
Or should I include a invoice.aspx page in the solution and put the info
there and then print it.........?
Guy
 
Can you please tell me how to create a new browser window (probably
hidden) and print it?

We seem to be going in circles here, Guy.

If you want the end user to print something, it has to be sent to the
browser.
Or should I include a invoice.aspx page in the solution and put the info
there and then print it.........?

yes, that's exactly what we're saying. Show the 'receipt' on-screen, at
which point they can print it if they want to.

-Darrel
 
Back
Top