Monday, September 10, 2007

How to restrict copy(ctrl + c) and paste(ctrl + v) functionality of text boxes in web application.

use

oncopy="return false;"

onpaste="return false;"

For example:

<td oncopy = "return false;" onpaste="return false;" >

<asp:TextBox ID="txtEmail" runat="server" Width="284px"></asp:TextBox>

</td>

1 comment:

Swati Jain said...

This is one of the most wanted solution. for more discussion details. following link can be helpful

http://forums.asp.net/t/1125227.aspx