.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 >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to disable copy, paste for a textbox

Posted By: priya     Posted Date: April 13, 2011    Points:5   Category :ASP.Net
Hi,

How to disable copy, paste for a textbox in asp.net. I am using C# as my code language.

Thanks in Advance
Priya

Responses
Author: kamlesh             
Posted Date: April 14, 2011     Points: 20   

check below link:

http://forums.asp.net/t/1125227.aspx/1?disable+COPY+Paste+function+on+a+textbox
http://www.developerfusion.com/thread/43072/disable-copypaste-in-textbox/

Thanks And Regards.
Kamlesh Nikam
Author: Sunil Yadav       [Moderator]   Accepted Answer   
Posted Date: April 14, 2011     Points: 40   

Try this

<asp:TextBox ID="txtName" runat="server" oncut="return false" oncopy="return false" onpaste="return false">
</asp:TextBox>




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

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