Disable web printing

Discussion in 'ASP .Net' started by Alan Z. Scharf, Aug 11, 2004.

  1. How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    application?

    Thanks.

    Alan
    Alan Z. Scharf, Aug 11, 2004
    #1
    1. Advertising

  2. Alan Z. Scharf

    Peter Morris Guest

    Peter Morris, Aug 11, 2004
    #2
    1. Advertising

  3. Alan Z. Scharf

    Lucas Tam Guest

    "Alan Z. Scharf" <> wrote in news:uJ#PYk9fEHA.2028
    @tk2msftngp13.phx.gbl:

    > How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    > application?


    Maybe with Javascript

    But someone can just take a screenshot.

    --
    Lucas Tam ()
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
    Lucas Tam, Aug 11, 2004
    #3
  4. > http://www.howtodothings.com/showarticle.asp?article=83

    That's a cheap amateur trick, which isn't going to prevent anyone but the
    ignorant from printing the page. Bottom line is, it can't be done. Show me
    any page on the Internet, and I can copy it and print it.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Peter Morris" <> wrote in message
    news:...
    > Hi
    >
    > I don't know if that is possible, but there is another trick available for
    > stopping people from printing your page :)
    >
    > http://www.howtodothings.com/showarticle.asp?article=83
    >
    >
    > --
    > Pete
    > ====
    > Audio compression components, DIB graphics controls, FastStrings
    > http://www.droopyeyes.com
    >
    > Read or write articles on just about anything
    > http://www.HowToDoThings.com
    >
    >
    Kevin Spencer, Aug 11, 2004
    #4
  5. Alan Z. Scharf

    WJ Guest

    "Alan Z. Scharf" <> wrote in message
    news:uJ%...
    > How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    > application?
    >


    Why would you want to do this ? I would be very mad as hell if my system is
    altered. I am as your client, I am the owner of my system. You are not
    allowed without my consent to alter my system. As soon as I see such sites
    doing these types of stuff, I would never come back. So, please do not do
    it. If yours is so secret or highly valuable, then put it in the safe box,
    do not publish it in the 1st place.

    John
    WJ, Aug 11, 2004
    #5
  6. Alan Z. Scharf

    Mark Rae Guest

    "WJ" <> wrote in message
    news:eAAYii%...

    > "Alan Z. Scharf" <> wrote in message
    > news:uJ%...
    > > How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    > > application?
    > >

    >
    > Why would you want to do this ? I would be very mad as hell if my system

    is
    > altered. I am as your client, I am the owner of my system. You are not
    > allowed without my consent to alter my system. As soon as I see such sites
    > doing these types of stuff, I would never come back. So, please do not do
    > it. If yours is so secret or highly valuable, then put it in the safe box,
    > do not publish it in the 1st place.


    I couldn't agree more! What a moronic thing to try to do!
    Mark Rae, Aug 11, 2004
    #6
  7. Alan Z. Scharf

    Peter Morris Guest

    Hi

    > That's a cheap amateur trick


    Actually it is a very useful trick for providing two versions of a page, one
    for reading, and one for printed (without adverts etc). As far as I know
    there is no way at all to stop someone from printing a webpage, so for the
    sake of a single line of HTML it is better to put off a large number of
    people than none at all. Yes, I believe that a large number of people who
    use the Internet would not know how to circumvent it because they are
    computer "users" and not computer "programmers".


    > which isn't going to prevent anyone but the
    > ignorant from printing the page. Bottom line is, it can't be done. Show me
    > any page on the Internet, and I can copy it and print it.


    Well, that's a bit like telling Superman that there is a metal which can't
    be bent now isn't it :)


    --
    Pete
    ====
    Audio compression components, DIB graphics controls, FastStrings
    http://www.droopyeyes.com

    Read or write articles on just about anything
    http://www.HowToDoThings.com
    Peter Morris, Aug 12, 2004
    #7
  8. Security isn't horseshoes. Almost only counts in horseshoes and hand
    grenades. Something is either secure or it is not. There is no such thing as
    "sort of" secure. If the goal of this is to prevent printing of web
    documents, it is a failure.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Peter Morris" <> wrote in message
    news:...
    > Hi
    >
    > > That's a cheap amateur trick

    >
    > Actually it is a very useful trick for providing two versions of a page,

    one
    > for reading, and one for printed (without adverts etc). As far as I know
    > there is no way at all to stop someone from printing a webpage, so for the
    > sake of a single line of HTML it is better to put off a large number of
    > people than none at all. Yes, I believe that a large number of people who
    > use the Internet would not know how to circumvent it because they are
    > computer "users" and not computer "programmers".
    >
    >
    > > which isn't going to prevent anyone but the
    > > ignorant from printing the page. Bottom line is, it can't be done. Show

    me
    > > any page on the Internet, and I can copy it and print it.

    >
    > Well, that's a bit like telling Superman that there is a metal which can't
    > be bent now isn't it :)
    >
    >
    > --
    > Pete
    > ====
    > Audio compression components, DIB graphics controls, FastStrings
    > http://www.droopyeyes.com
    >
    > Read or write articles on just about anything
    > http://www.HowToDoThings.com
    >
    >
    Kevin Spencer, Aug 12, 2004
    #8
  9. Alan Z. Scharf

    Peter Morris Guest

    > Security isn't horseshoes. Almost only counts in horseshoes and hand
    > grenades.


    I have no idea what you are talking about.


    > Something is either secure or it is not. There is no such thing as
    > "sort of" secure. If the goal of this is to prevent printing of web
    > documents, it is a failure.


    Indeed it is. It is not possible to stop people from printing, so I offered
    a technique which would print a different webpage. There are many too ways
    to print a webpage to be able to stop someone from doing it completely, but
    does that mean I still shouldn't post? I don't think so.


    --
    Pete
    ====
    Audio compression components, DIB graphics controls, FastStrings
    http://www.droopyeyes.com

    Read or write articles on just about anything
    http://www.HowToDoThings.com
    Peter Morris, Aug 12, 2004
    #9
  10. Because my client wants to do that, until I can convince him otherwise.

    It is for use on a specific internal intranet application, not public
    website.

    Alan


    "WJ" <> wrote in message
    news:eAAYii#...
    >
    > "Alan Z. Scharf" <> wrote in message
    > news:uJ%...
    > > How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    > > application?
    > >

    >
    > Why would you want to do this ? I would be very mad as hell if my system

    is
    > altered. I am as your client, I am the owner of my system. You are not
    > allowed without my consent to alter my system. As soon as I see such sites
    > doing these types of stuff, I would never come back. So, please do not do
    > it. If yours is so secret or highly valuable, then put it in the safe box,
    > do not publish it in the 1st place.
    >
    > John
    >
    >
    Alan Z. Scharf, Aug 12, 2004
    #10
  11. Thanks to all who replied. I appreciate your answers very much.

    Alan


    "Alan Z. Scharf" <> wrote in message
    news:uJ#...
    > How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    > application?
    >
    > Thanks.
    >
    > Alan
    >
    >
    Alan Z. Scharf, Aug 12, 2004
    #11
  12. Thanks to all who replied. I appreciate your answers very much.

    Alan

    "Alan Z. Scharf" <> wrote in message
    news:uJ#...
    > How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    > application?
    >
    > Thanks.
    >
    > Alan
    >
    >
    Alan Z. Scharf, Aug 13, 2004
    #12
  13. Because my client wants to do that, until I can convince him otherwise.

    It is for use on a specific internal intranet application, not public
    website.

    Alan

    "WJ" <> wrote in message
    news:eAAYii#...
    >
    > "Alan Z. Scharf" <> wrote in message
    > news:uJ%...
    > > How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    > > application?
    > >

    >
    > Why would you want to do this ? I would be very mad as hell if my system

    is
    > altered. I am as your client, I am the owner of my system. You are not
    > allowed without my consent to alter my system. As soon as I see such sites
    > doing these types of stuff, I would never come back. So, please do not do
    > it. If yours is so secret or highly valuable, then put it in the safe box,
    > do not publish it in the 1st place.
    >
    > John
    >
    >
    Alan Z. Scharf, Aug 13, 2004
    #13
  14. Alan Z. Scharf

    someone Guest

    On Wed, 11 Aug 2004 17:17:45 -0400, "WJ" <>
    wrote:

    >
    >"Alan Z. Scharf" <> wrote in message
    >news:uJ%...
    >> How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    >> application?
    >>

    >
    >Why would you want to do this ? I would be very mad as hell if my system is
    >altered. I am as your client, I am the owner of my system. You are not
    >allowed without my consent to alter my system. As soon as I see such sites
    >doing these types of stuff, I would never come back. So, please do not do
    >it. If yours is so secret or highly valuable, then put it in the safe box,
    >do not publish it in the 1st place.
    >
    >John
    >

    There are many cases that this might be necessary for legal and other
    reasons. Just because you are looking at it on your system doesn't
    mean you own the content. Make sure you read the fine print on most if
    not all sites. You are highly restricted on what you can and cannot do
    legally.
    Peace,
    Mike
    someone, Aug 14, 2004
    #14
  15. Alan Z. Scharf

    Souri Challa Guest

    Alan,

    One option is to open the required page as new window (
    Window.ShowModalDialog ). You can disable the tool bar in this window.
    You may also consider suppressing the content for printing. You can do this
    on the client side using 'OnBeforePrint' ,'OnAfterPrint' events.

    Let me know if you find any better options without having to use any third
    party tools.

    -Souri Challa

    "Alan Z. Scharf" <> wrote in message
    news:...
    >
    > Thanks to all who replied. I appreciate your answers very much.
    >
    > Alan
    >
    > "Alan Z. Scharf" <> wrote in message
    > news:uJ#...
    > > How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    > > application?
    > >
    > > Thanks.
    > >
    > > Alan
    > >
    > >

    >
    >
    Souri Challa, Aug 15, 2004
    #15
  16. Souri,

    Thanks for your reply.

    In what documentation could I get more info on this?

    Regards,

    Alan

    "Souri Challa" <> wrote in message
    news:jaLTc.13792$mD.2567@attbi_s02...
    > Alan,
    >
    > One option is to open the required page as new window (
    > Window.ShowModalDialog ). You can disable the tool bar in this window.
    > You may also consider suppressing the content for printing. You can do

    this
    > on the client side using 'OnBeforePrint' ,'OnAfterPrint' events.
    >
    > Let me know if you find any better options without having to use any third
    > party tools.
    >
    > -Souri Challa
    >
    > "Alan Z. Scharf" <> wrote in message
    > news:...
    > >
    > > Thanks to all who replied. I appreciate your answers very much.
    > >
    > > Alan
    > >
    > > "Alan Z. Scharf" <> wrote in message
    > > news:uJ#...
    > > > How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
    > > > application?
    > > >
    > > > Thanks.
    > > >
    > > > Alan
    > > >
    > > >

    > >
    > >

    >
    >
    Alan Z. Scharf, Aug 15, 2004
    #16
  17. Alan Z. Scharf

    WJ Guest

    "someone" <> wrote in message
    news:...
    > On Wed, 11 Aug 2004 17:17:45 -0400, "WJ" <>
    > wrote:
    >
    > There are many cases that this might be necessary for legal and other
    > reasons. Just because you are looking at it on your system doesn't
    > mean you own the content. Make sure you read the fine print on most if
    > not all sites. You are highly restricted on what you can and cannot do
    > legally.
    > Peace,
    > Mike


    I do not dispute or have any ? about web contents and I do not claim
    anything on www as mine. However, My PC is mine, not the www.

    John
    WJ, Aug 23, 2004
    #17
  18. Alan Z. Scharf

    w3Rm Guest

    Alan Z. Scharf wrote:
    > *How can I disable the IE6 Print button and Ctrl-P for an ASP.Net
    > web
    > application?
    >
    > Thanks.
    >
    > Alan *



    function disableCopyPastePrint() {
    //write by w3Rm
    if (((event.ctrlKey) && (parseInt(event.keyCode) == 67)) || //ctrl +
    c
    ((event.ctrlKey) && (parseInt(event.keyCode) == 80)) || //ctrl + p
    ((event.ctrlKey) && (parseInt(event.keyCode) == 86))) { //ctrl + v
    event.keyCode = 0;
    event.returnValue = false;
    return false;
    }
    }
    document.onkeydown = disableCopyPastePrint;



    --
    w3Rm
    ------------------------------------------------------------------------
    Posted via http://www.codecomments.com
    ------------------------------------------------------------------------
    w3Rm, Aug 27, 2005
    #18
  19. Alan Z. Scharf

    Kenny

    Joined:
    Aug 17, 2008
    Messages:
    1
    So how do I print an unprintable web page without taking multiple screen shots?
    Ctrl was disabled.
    Print button is not present
    Right Click is disabled

    What should I do?
    Kenny, Aug 17, 2008
    #19
    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.
Similar Threads
  1. mg
    Replies:
    0
    Views:
    420
  2. Jon B
    Replies:
    7
    Views:
    7,500
    =?Utf-8?B?SmFzb25DaG9p?=
    Jan 30, 2006
  3. Neo Geshel
    Replies:
    8
    Views:
    445
    Neo Geshel
    Mar 21, 2007
  4. Grey

    Disable header info printing

    Grey, Nov 12, 2003, in forum: ASP General
    Replies:
    1
    Views:
    107
    Aaron Bertrand - MVP
    Nov 12, 2003
  5. Rahul Chatterjee

    disable buttons when printing an asp page

    Rahul Chatterjee, Apr 30, 2004, in forum: ASP General
    Replies:
    2
    Views:
    166
    Roland Hall
    May 1, 2004
Loading...

Share This Page