Need sample code server side printing

Discussion in 'ASP .Net' started by Peter Kaufman, Mar 5, 2004.

  1. Hi,

    Subject line says it all except VB.NET preferred, but C# would be okay
    too.

    Thanks a lot,

    Peter
     
    Peter Kaufman, Mar 5, 2004
    #1
    1. Advertising

  2. The Server cannot print - you'll need to use the client (such as JavaScript). check the "print" function in any JS reference

    This is for security reasons - you wouldn't want a user to load up a page, and then the server takes over the printer

    Tim Stal

    ----- Peter Kaufman wrote: ----

    Hi

    Subject line says it all except VB.NET preferred, but C# would be oka
    too

    Thanks a lot

    Pete
     
    =?Utf-8?B?VGltIFN0YWxs?=, Mar 5, 2004
    #2
    1. Advertising

  3. Peter Kaufman

    nfedin Guest

    By its very nature, server side code can't print. The server has no
    user interface, which includes printing.

    Write the output to a file and then have the user/admin print it
    themselves when they need to.

    Neil



    Peter Kaufman <> wrote in message news:<>...
    > Hi,
    >
    > Subject line says it all except VB.NET preferred, but C# would be okay
    > too.
    >
    > Thanks a lot,
    >
    > Peter
     
    nfedin, Mar 5, 2004
    #3
  4. I don't think that's strictly the case; if you wrote code on the server to
    do printing (e.g. http://www.c-sharpcorner.com/Printing.asp) and you gave
    your ASP.NET worker process permissions (or did impersonation) to use the
    printer, I don't see why it wouldn't work.

    That said, yes, you really want to think through the security implications.


    --
    Thanks,

    Eric Lawrence
    Program Manager
    Assistance and Worldwide Services

    This posting is provided "AS IS" with no warranties, and confers no rights.


    "Tim Stall" <> wrote in message
    news:...
    > The Server cannot print - you'll need to use the client (such as

    JavaScript). check the "print" function in any JS reference.
    >
    > This is for security reasons - you wouldn't want a user to load up a page,

    and then the server takes over the printer.
    >
    > Tim Stall
    >
    > ----- Peter Kaufman wrote: -----
    >
    > Hi,
    >
    > Subject line says it all except VB.NET preferred, but C# would be

    okay
    > too.
    >
    > Thanks a lot,
    >
    > Peter
    >
     
    Eric Lawrence [MSFT], Mar 5, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page