To protect the text to perform the copy, cut and paste for the security purpose. Many time we need to perform this, we need just use the below code:-
In ASP.Net
In ASP.Net
<asp:TextBox ID="txtmsg" runat="server" Width="259px"oncopy="return false" onpaste="return false"
oncut="return false" oncontextmenu="return false"></asp:TextBox>
In HTML
<input type="text" id="txtmsg" oncopy="return false"onpaste="return false" oncut="return false"
oncontextmenu="return false" />
0 comments:
Post a Comment