工欲善其事, its prerequisite
In a Web page developed by ASP, it is sometimes necessary to prevent users from pasting the copied password and to prevent the user from copying the article directly into the text box. The way to do this is to write code that prohibits pasting text directly where the control is restricted. However, this is not very convenient, if a page has 5 TextBox control, this time must be separate for each control is written to prohibit copy, paste code, resulting in a lot of work. Let's take a look at the specific operation below.
The first step is to create a new empty WebForm page.
In the second step, add several TextBox controls to the WebForm.
In the third step, add oncut= "return false" to the body tag. Oncopy = "return false;" Onpaste = "return false;"
Finally run through the browser, all the controls on the page cannot be pasted, cut, copied. The test results are as follows
Cut, copy, and paste methods are not allowed in ASP.