.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> ASP.NET Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Disable Copy,Cut and Paste of the Aspx textbox

Posted By:Asha.MP       Posted Date: November 11, 2010    Points: 15    Category: ASP.NET Controls    URL: http://www.dotnetspark.com  

This code is used to disable copy, cut paste of the textbox
 

In Asp.net for the textboxes, if you want to disable some options like Copy,Paste and Cut, you can do this by writing simple code in the aspx page as below.

<td><asp:TextBox ID="TxtNameEmp" runat ="server" oncut="return false" >asp:TextBox>td>

<td><asp:TextBox ID="TxtId" runat ="server" oncopy="return false">asp:TextBox>td>

<td><asp:TextBox ID="TxtAddress" runat ="server" onpaste="return false">asp:TextBox>td>

tr>

table>


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend