Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Help about using PrintDocument from aspx page

Help about using PrintDocument from aspx page

Scheduled Pinned Locked Moved ASP.NET
helpdebuggingquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JackChen626
    wrote on last edited by
    #1

    In my aspx program, while I invoking PrintDocument.Print method the page is always busy and never timeout. I try to debug it but the same situation happen so I can't solve the problem.... The same code section can run under winform project, but can't run under webform. anybody can help me? Thanks a lot.

    J 1 Reply Last reply
    0
    • J JackChen626

      In my aspx program, while I invoking PrintDocument.Print method the page is always busy and never timeout. I try to debug it but the same situation happen so I can't solve the problem.... The same code section can run under winform project, but can't run under webform. anybody can help me? Thanks a lot.

      J Offline
      J Offline
      JackChen626
      wrote on last edited by
      #2

      actually i want to print from the web server, not the browser my test code is as below when you click button1, the web page remain busy and no response and never throw exception or timeout Imports System.Drawing.Printing Public Class test Inherits System.Web.UI.Page Private WithEvents mPD As PrintDocument Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click mPD = New PrintDocument mPD.PrintController = New StandardPrintController mPD.Print() End Sub Private Sub mPD_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles mPD.PrintPage e.Graphics.DrawString("test", New Font(FontFamily.GenericSansSerif, 12), New SolidBrush(Color.Black), 10, 10) End Sub End Class

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups