How to print a page.aspx in C#?

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
 
H

http://www.visual-basic-data-mining.net/forum

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
 
K

Karl Seguin

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
 
K

Kevin Spencer

JavaScript: window.print();

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,087
Members
48,773
Latest member
Kaybee

Latest Threads

Top