I have my web page published in hosting, and I cant print my reports because (I tink) my web application can`t get my printer name.
An Idea please.
Thanks a lot.
I have my web page published in hosting, and I cant print my reports because (I tink) my web application can`t get my printer name.
An Idea please.
Thanks a lot.
use web config file to set your printer name. use this name in printer settings.
<add key="PrinterName" value="\\192.168.1.1\Canon LBP6000/LBP6018" />
in c#
PrintDocument printDoc = new PrintDocument();
string printerName = WebConfigurationManager.AppSettings["PrinterName"];
printDoc.PrinterSettings.PrinterName = printerName;
did work for me .