print from ASP.NET?

Results 1 to 2 of 2

Thread: print from ASP.NET?

  1. #1
    Join Date
    Dec 1969

    Default print from ASP.NET?

    Hiya, <BR><BR>How do I print from an ASP.NET page? I have the following code: <BR><BR>&#060;%@ Page language="C#" %&#062; <BR>&#060;%@ Import Namespace="System.Drawing" %&#062; <BR>&#060;%@ Import Namespace="System.Drawing.Printing" %&#062; <BR><BR>&#060;script runat="server"&#062; <BR><BR>void TestPrint( Object sender, PrintPageEventArgs e ) <BR>{ <BR> Font printFont = new Font("Courier New", 12); <BR> e.Graphics.DrawString( "test print", printFont,Brushes.Black, 0, 0); <BR>} <BR><BR>void Page_Load(Object sender, EventArgs e) <BR>{ <BR> PrintDocument printDoc = new PrintDocument(); <BR> printDoc.PrintPage += new PrintPageEventHandler( TestPrint ); <BR><BR> printDoc.Print(); <BR><BR>} <BR>&#060;/script&#062; <BR><BR>Thanks for any help. <BR>Cheers.

  2. #2
    Join Date
    Dec 1969

    Default RE: print from ASP.NET?

    Not sure exactly what you are trying to do, but toprint, I would just use a standard JavaScript self.print();<BR><BR>??<BR>D<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts