Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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.
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

705 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

20 Experts available now in Live!

Get 1:1 Help Now