Solved

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

Posted on 2011-02-21
5
382 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to count occurrences of each item in an array.

786 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