By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,571 Members | 3,168 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,571 IT Pros & Developers. It's quick & easy.

Printing Client side in ASP.NET

P: n/a
Hi All,
I have a web form. let's say it has 3 fields. Employee No, Name ansd
salary. Now my problem is I want to print the contents of this screen
to a local printer. Note that this is client side printing and not
server side!!
I do not want to print the screen but the contents of the screen
(Employee No, Name and salary).
Also is there a way that the printer dialog will not appear while
printing.

Thanks in advance!!

Regards
Anil

Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Anil,

Because it is a webform, you could use stylsheets (css) for this.
A quick search led me to this site:
http://css-discuss.incutio.com/?page=PrintStylesheets

HTH
Christiaan

<an********@gmail.com> schreef in bericht
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi All,
I have a web form. let's say it has 3 fields. Employee No, Name ansd
salary. Now my problem is I want to print the contents of this screen
to a local printer. Note that this is client side printing and not
server side!!
I do not want to print the screen but the contents of the screen
(Employee No, Name and salary).
Also is there a way that the printer dialog will not appear while
printing.

Thanks in advance!!

Regards
Anil

Nov 17 '05 #2

P: n/a
an********@gmail.com wrote:
Hi All,
I have a web form. let's say it has 3 fields. Employee No, Name ansd
salary. Now my problem is I want to print the contents of this screen
to a local printer. Note that this is client side printing and not
server side!!
I do not want to print the screen but the contents of the screen
(Employee No, Name and salary).
Also is there a way that the printer dialog will not appear while
printing.

Thanks in advance!!

Regards
Anil


As Christiaan said, you can use css to specify what content should be
hidden from the printer.
It is not possible to print client-side without that print-dialog, it's a security
feature. Imagine what would happen if some of the "less polite" sites
where able to print anything without you being able to stop it!

Hans Kesting
Nov 17 '05 #3

P: n/a
All you have to do is wrap the fields inside a div tag, then send the div
tag to a client side script and call InnerHTML method of div tag to send to
new window. This is really a client-side scripting issue.

<an********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi All,
I have a web form. let's say it has 3 fields. Employee No, Name ansd
salary. Now my problem is I want to print the contents of this screen
to a local printer. Note that this is client side printing and not
server side!!
I do not want to print the screen but the contents of the screen
(Employee No, Name and salary).
Also is there a way that the printer dialog will not appear while
printing.

Thanks in advance!!

Regards
Anil

Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.