I am currently working with onlize quiz. Is it possible to disable CTRL, ALT, other keys and status bar? My concern is to secure my page such that nobody can copy any data displayed in the page.

How can I do this in ASP.Net using C# as my script?

10 Years
Discussion Span
Last Post by salvea

This will only happen when my students will conduct online quiz using my site. After they have logged in to my site and opening the page for online quiz that's the only page where those keys should be disabled to ensure that when they conduct the quiz they will not copy the questions and give it to my other students who were not able to take yet their online quiz.

I think this objective is good. If you dont want to share the code to anybody else they might use it for bad things, please email to me the answer at <snipped>. You may visit my site to prove that I am using it in my class <snipped>


Yes you can disable those keys, but it won't stop them from using the clipboard.

However, what you can do is set up a javascript function that gets called constantly. Then inside the function you set a cursor position, which will stop them from highlighting, and from "Selecting All".


to ensure that when they conduct the quiz they will not copy the questions and give it to my other students who were not able to take yet their online quiz

How you gone prevent use of mobile phones with camera???


Thanks SheSaidImaPreggy at least you understand my objective in doing such application. Can I have a sample code to make use of it as a good start? Thanks in advance...


he can make the opacity of the entire screen down to 30% so the camera can't pick it up!!

That will go completely against HCI (Human-Computer Interaction) as you make site difficult to read and just get students something silly to complain about...

onpaste="return false;" oncopy="return false;"

use these events where you want to diable the copy.you can use it for form also if you want your page secured.try this it will work
tahnk you!


Thanks to all of you guys! What about if I want to disable the PrintScreen button?


People like to complain about lazy students, I should about lazy teachers like you

I think you got me wrong peter_budo. What I am saying is PrintScreen key of the keyboard and not an attempt to print the page. Next time may we be responsible enough in the statements that we write. The very purpose of this forum is learning and not complaining. You should know that most of the visitors of this site patiently read all the postings to learn and not to criticize anybody.

On the contrary, I still appreciate you on your honest intention to help me...


Thanks srikanthkadem! It works well in my project. I only experience a problem when the PrintScreen key of the keyboard is pressed the first time, still it captures a data. Rest assured, I really salute all those members who patiently and humbly answer postings in this forum...


no one can understand where is the code to disable print screen.
i want to disable print screen option please help me

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.