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. How to prevent "save as" in tool bar ?

How to prevent "save as" in tool bar ?

Scheduled Pinned Locked Moved ASP.NET
questionhtmltutorial
8 Posts 4 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.
  • I Offline
    I Offline
    israeli
    wrote on last edited by
    #1

    Hello, Is it possible to prevent the user from using the option File-->Save As..." and to save the web page at his computer as *.htm or *.html ? Another good option to prevent is to hide the view option in the tool bar, is it possible ? One more thing, I have prevented the option of right click, but syill when the cursor is on a pic the automatic bar with the icons for the options of save, print, etc' appears. How can I prevent it ? Bye and Happy new year for you.

    D 1 Reply Last reply
    0
    • I israeli

      Hello, Is it possible to prevent the user from using the option File-->Save As..." and to save the web page at his computer as *.htm or *.html ? Another good option to prevent is to hide the view option in the tool bar, is it possible ? One more thing, I have prevented the option of right click, but syill when the cursor is on a pic the automatic bar with the icons for the options of save, print, etc' appears. How can I prevent it ? Bye and Happy new year for you.

      D Offline
      D Offline
      DavidNohejl
      wrote on last edited by
      #2

      hi, I am affraid that is very difficult (or even impossible) :( israeli wrote: I have prevented the option of right click, how? I suspect when user disable JavaScript in browser your prevention will stop working. Or do you use different trick I don't know? Keep in mind that in ASP.NET you have full control of what you send to client, bt once it's loaded in browser you can do nothing (IMO). best regards, David 'DNH' Nohejl Never forget: "Stay kul and happy" (I.A.)

      N 1 Reply Last reply
      0
      • D DavidNohejl

        hi, I am affraid that is very difficult (or even impossible) :( israeli wrote: I have prevented the option of right click, how? I suspect when user disable JavaScript in browser your prevention will stop working. Or do you use different trick I don't know? Keep in mind that in ASP.NET you have full control of what you send to client, bt once it's loaded in browser you can do nothing (IMO). best regards, David 'DNH' Nohejl Never forget: "Stay kul and happy" (I.A.)

        N Offline
        N Offline
        nikneem2005
        wrote on last edited by
        #3

        I even cannot imagine one situation in which you would prevent a user from performing those actions (both). I don't consider preventing popup menu's as handy and want to keep them. Programming them away is nothing more than a loss... I love it when a plan comes together

        D 1 Reply Last reply
        0
        • N nikneem2005

          I even cannot imagine one situation in which you would prevent a user from performing those actions (both). I don't consider preventing popup menu's as handy and want to keep them. Programming them away is nothing more than a loss... I love it when a plan comes together

          D Offline
          D Offline
          DavidNohejl
          wrote on last edited by
          #4

          nikneem2005 wrote: I consider preventing popup menu's as handy and want to keep them. sry for my english (since you are from US problem will most probably be in my english) bt what do you mean whan you say nikneem2005 wrote: d prevent a user from performing those actions. ? Do you mean popup menu or Save... or both? I think Israeli's point is in denying acces to html/css/JavaScript source of page... or not? nikneem2005 wrote: I consider preventing popup menu's as handy and want to keep them now I think you agree with preventing user from popup menus :confused: What I am saying is, that you CANNOT prevent user from anything... once you send the page to browser best regards, David 'DNH' Nohejl Never forget: "Stay kul and happy" (I.A.)

          N 1 Reply Last reply
          0
          • D DavidNohejl

            nikneem2005 wrote: I consider preventing popup menu's as handy and want to keep them. sry for my english (since you are from US problem will most probably be in my english) bt what do you mean whan you say nikneem2005 wrote: d prevent a user from performing those actions. ? Do you mean popup menu or Save... or both? I think Israeli's point is in denying acces to html/css/JavaScript source of page... or not? nikneem2005 wrote: I consider preventing popup menu's as handy and want to keep them now I think you agree with preventing user from popup menus :confused: What I am saying is, that you CANNOT prevent user from anything... once you send the page to browser best regards, David 'DNH' Nohejl Never forget: "Stay kul and happy" (I.A.)

            N Offline
            N Offline
            nikneem2005
            wrote on last edited by
            #5

            I'm from The Netherlands, my English isn't that well :-) Modified the message, hope you understand it now... don't mess with IE functions, leave them alone :) I love it when a plan comes together

            D 1 Reply Last reply
            0
            • N nikneem2005

              I'm from The Netherlands, my English isn't that well :-) Modified the message, hope you understand it now... don't mess with IE functions, leave them alone :) I love it when a plan comes together

              D Offline
              D Offline
              DavidNohejl
              wrote on last edited by
              #6

              nikneem2005 wrote: I'm from The Netherlands So change your profile.. it's confusing :) Forgive my my ignorance etc. bt Netherlands, hmm ain't it called also Holland? :-o(quick check-yes it is )ohh.... My wannabe girfriend (read I want her to be my gf) is located in holland now :(( Don't you speak english there? :confused: nikneem2005 wrote: don't mess with IE functions, leave them alone Did you say IE? X| did you really say IE? :doh: IE has only one function... to f**ck with me! I really don't like IE :mad: And I love w3c.. it's not coincidence ;) Ok so this was way how i feel it so now back to topic: as I said, I think israeli wants to prevent user from accessing his html code... what is IMHO not possible. No matter how much you mess with IE ;) best regards, David Never forget: "Stay kul and happy" (I.A.)

              S 1 Reply Last reply
              0
              • D DavidNohejl

                nikneem2005 wrote: I'm from The Netherlands So change your profile.. it's confusing :) Forgive my my ignorance etc. bt Netherlands, hmm ain't it called also Holland? :-o(quick check-yes it is )ohh.... My wannabe girfriend (read I want her to be my gf) is located in holland now :(( Don't you speak english there? :confused: nikneem2005 wrote: don't mess with IE functions, leave them alone Did you say IE? X| did you really say IE? :doh: IE has only one function... to f**ck with me! I really don't like IE :mad: And I love w3c.. it's not coincidence ;) Ok so this was way how i feel it so now back to topic: as I said, I think israeli wants to prevent user from accessing his html code... what is IMHO not possible. No matter how much you mess with IE ;) best regards, David Never forget: "Stay kul and happy" (I.A.)

                S Offline
                S Offline
                srirambdl
                wrote on last edited by
                #7

                You can just add oncontextmenu = false in tag. It will prevent the pop up menu.

                D 1 Reply Last reply
                0
                • S srirambdl

                  You can just add oncontextmenu = false in tag. It will prevent the pop up menu.

                  D Offline
                  D Offline
                  DavidNohejl
                  wrote on last edited by
                  #8

                  ok.. you are right... for IE it works (one more reason why IE sucks!). But that's one problem. When you try exactly the same page in Firefox (And I bet in Opera as well), pop-up menu will be enabled. So, if you tried to disable pupup menu for secury reason (e.g. don't want to share source), you failed... Page source is avaiable for everybody w/o IE... that's 20% of users? (http://www.w3schools.com/browsers/browsers_stats.asp[^]) In fact I know almost nothing about security, bt I have tested this... Plus it's obvious that whatever you send to client is accessible for him. best regards, David 'DNH' Nohejl Never forget: "Stay kul and happy" (I.A.)

                  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