How to print a page.aspx in C#?

  • Thread starter Thread starter Eliyahu Goldin
  • Start date Start date
E

Eliyahu Goldin

To print the page use client-side javascript call print(). You may want to
use client-side events onbeforeprint and onafterprint. Sometimes you would
want to make a special printer-friendly version of the page on the server.

Eliyahu
 
Hello

I'm new at asp.net and C#.

I have a page called Information.aspx. On that page there is a button
"Print".
If you click that button I want to send the information that is on the page
to print it out.

Can anybody help me
 
you need to execute the javascript function window.print()

you can do this by doing btn.attributes.add("onClick", "window.print();")
if it's a WebControls.Button, or simply using a normal HTML button and
adding "onClick=window.print();" in the html tag..

Karl
 
JavaScript: window.print();

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
Back
Top