Cannot show print dialog on the top of asp.net web control
问题 I am currently using System.Windows.Forms. PrintDialog on a custom control in ASP.net because I want to show the print dialog and assign its PrinterSettings to ReportPrintDocument.PrinterSettings after I click Ok button on the dialog. Here is my code: using (PrintDialog printDialog = new PrintDialog()) { if (printDialog.ShowDialog() == DialogResult.OK) { ReportPrintDocument rp = new ReportPrintDocument(rvPermit.ServerReport); rp.PrinterSettings = printDialog.PrinterSettings; rp.Print(); } }