Printing in ASP.NET

J

JP SIngh

Is it possible to send a file directly to printer in ASP.NET?

I have a page which display the list of files associated with the record
with hyperlinks to the files. I want to provide a link next to each file to
allow people to click the button and send the appriopriate file to the
printer.

Is it possible to do this in ASP.Net?

Regards
Jas
 
N

Nathan Sokalski

I had a similar situation, and what I did was create a page that included
two simple Javascript commands in the Body tag's OnLoad event. Here is a
what I did:

<body onload="window.print();window.close()">

If your files are things like Word Documents, spreadsheets, or other files
that cannot be shown in an *.aspx page, then, no, there is not a way to send
them to the printer without the user having so kind of plugin or addon,
because only files displayed and handled by the browser can be printed
through this technique.
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top