Disable copy paste in textbox asp.net


When you make a application where there is need of genuine user input, but most of time user tend to copy and paste in your provided text box where it is single line and multiline textbox. Then you can active these properties as shown below

 C# |  copy code |? 
<asp:TextBox ID="TextBox1" oncopy="return false" onpaste="return false" oncut="return false"
            runat="server" />

Leave a Comment

Your email address will not be published.