views:

88

answers:

2

Hi, I have a Web application programmed in C#.

There are several printers and I want to choose any of them and execute the action, I would like some kind of Form to load all printers.

I found this for Win forms:

this.printDialog1.Document = this.printDocument1;

DialogResult dr =  this.printDialog1.ShowDialog();

But I couldn't find something for ASP.NET.

Thanks for any help.

A: 

The printer is assigned at the workstation.

IrishChieftain
yes it is assigned
Rudy
Heh - he wasn't asking if it was assigned - he was telling you that the user at the workstation picks the printer. There is nothing a webpage can do to change that.
Jason Berkan
+1  A: 

You really can't do it from a web app, if it was allowed then pop-up loving sites all over the internet would I'm sure be accounting for most of the worlds ink usage.

I had this issue when building a web app for a college, the most its possible to do is call up the print dialogue and have the user select the printer (best to have a decent print targeted CSS here):

javascript:window.print();

Its not perfect but to be honest although they insisted on it when it was put in a year ago, emails and PDF's are much more widely used.

Duncan