Have you ever worked really hard on graphics for your site only to find later that someone has stolen them as their own. You can help encrypt and protect your site with the following codes. No right click block is 100% effective, but they will help against novices.
![](http://dotnet4europeanhosting.hostforlife.eu/image.axd?picture=2015%2f4%2fFREE+banner+Hostforlife.png)
In the real world, sometimes a developer needs to restrict a basic facility such as cut, copy and paste on an entire web page but not on a specific control. At that time you will need some easy way to stop these kinds of facilities on the page but not create code in every control to disable these facilities.
Suppose you have 20 "TextBox" controls in your page and you want to restrict the cut, copy and paste in all the textboxes, then you do not need to write the disable code in each TextBox. In this scenario, you need to just write the disable code only in the "body" tag.
To explain such implementation, I will use the following procedure.
Step 1
Create an ASP.Net Empty Website named "My Project".
![](http://dotnet4hosting.asphostportal.com/image.axd?picture=2015%2f1%2ftujt.jpg)
Step 2
Add a new web form named "Default.aspx" into it.
![](http://dotnet4hosting.asphostportal.com/image.axd?picture=2015%2f1%2f2.jpg)
Step 3
Add 2 "TextBox" controls to the page named "Default.aspx" .
![](http://dotnet4hosting.asphostportal.com/image.axd?picture=2015%2f1%2f3.jpg)
Step 4
On Cut: By this, you can disable the "Cut " facility in both of the "TextBox" Controls.
Syntax: oncut= “return false”;
![](http://dotnet4hosting.asphostportal.com/image.axd?picture=2015%2f1%2f4.jpg)
On Copy: By this, you can disable the "Copy " facility in both of the "TextBox" controls.
Syntax: oncopy= “return false”;
![](http://dotnet4hosting.asphostportal.com/image.axd?picture=2015%2f1%2f5.jpg)
On Paste: By this, you can disable the "Cut" facility in both of the "TextBox" controls.
Syntax: onpaste= “return false”;
![](http://dotnet4hosting.asphostportal.com/image.axd?picture=2015%2f1%2f6.jpg)
To disable the All (Cut, Copy and Paste) in the entire page:
![](http://dotnet4hosting.asphostportal.com/image.axd?picture=2015%2f1%2f7.jpg)
HostForLIFE.eu ASP.NET 4.5 Hosting
European best, cheap and reliable ASP.NET hosting with instant activation. HostForLIFE.eu is #1 Recommended Windows and ASP.NET hosting in European Continent. With 99.99% Uptime Guaranteed of Relibility, Stability and Performace. HostForLIFE.eu security team is constantly monitoring the entire network for unusual behaviour. We deliver hosting solution including Shared hosting, Cloud hosting, Reseller hosting, Dedicated Servers, and IT as Service for companies of all size.
![](http://aspnetmvceuropeanhosting.hostforlife.eu/image.axd?picture=2016%2f3%2fimage.png)