Solved

ASP.NET - I failed in disabling Copy/Paste and Print on my webpage

Posted on 2011-02-21
5
381 Views
Last Modified: 2012-05-11
I have a problem with disabling copy/paste and print on my web page.

I have added the following to the body section:

ondragstart='return false' onselectstart='return false'

But I still can press ctrl + A then ctrl + C and paste the content into Word!

And when I added  oncontextmenu='return false' to disable right click, it worked only for the body section, but if the user goes to the bottom of the page, the right click works, and then he's able to print!

What do I do??
0
Comment
Question by:feesu
  • 3
5 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 334 total points
ID: 34941742
Perhaps this can help you further

Disable Print Screen Key and All Keyboard Keys in ASP.NET Page
http://www.codeproject.com/KB/aspnet/Protect_your_data.aspx
0
 
LVL 14

Assisted Solution

by:robasta
robasta earned 166 total points
ID: 34941746
0
 

Author Comment

by:feesu
ID: 34942041
Dhaest,

That code doesn't work. I can still ctrl + A to select all and ctrl + C then paste them in Word.

robasta,

I used that HTMLProtect and protected a page, but I was still able to copy its content. Check below, I copied it along with the software tag!:


This webpage is protected by HTMLProtector

Greetings from Manchester Business School, and thank you for your interest in the Manchester MBA Programme…
 
We know that embarking an MBA is a big commitment in terms of time and money so choosing the right programme, one that suits your individual circumstances and aspirations, is vital. Below is some general information about our  Global MBA with different pathways.  
 
Why MBS?
Manchester Business School is consistently ranked among the top business schools in the world. We are proud to be one of the few Triple Accredited Business Schools - by AMBA, EQUIS and AACSB International.The Manchester Global MBA is highly flexible and portable, meets the needs of busy executives and fits around your personal and professional commitments. Our proven blend of robust academic theory and practical, hands-on experience means you can start putting your learning into practice from day one, providing immediate benefits for you and your employer.
 

0
 
LVL 53

Assisted Solution

by:Dhaest
Dhaest earned 334 total points
ID: 34942710
You can also try it through javascript
http://www.15seconds.com/howto/pg000916.htm
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 34949150
Did you try my latest comment ?
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Read about why website design really matters in today's demanding market.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now