In the real world, sometimes developer needs to restrict the basic facility like cut, copy and paste on a whole web page not on a particular control. At that time you will need some easy way to stop these kinds of facilities on the page not the disabling these facilities in each control.
Suppose you have 20 ‘TextBox’ controls in your page and you want to restrict the cut, copy and paste in all textboxes, then you not need to write the disable code in each textbox. In this scenario, you have to just write the disable code only in ‘body’ tag.
To explain such implementation, I will follow some steps;
Step 1:Create a Asp.Net Empty Website named ‘My Project’.
Step 2:Add a new web form named ‘Default.aspx’ into it.
Step 3:Add 2 ‘TextBox’ controls in the page named ‘Default.aspx’ .
Syntax: oncut= “return false”;
Syntax: oncopy= “return false”;
ConclusionIn this article, I have described that how you can restrict the user to use cut, copy and paste facility in whole page and I hope it will be beneficial for you.