C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Tips » General »

How to restrict user to copy from a textbox or paste text to textbox using javascript


Posted Date: 19 Aug 2008    Resource Type: Tips    Category: General
Author: AbhayMember Level: Diamond    
Rating: 1 out of 5Points: 2



Description :


How to restrict user to copy from a textbox or paste text to textbox using JavaScript.

Here is the code :

< script language="javascript" >
function copy() {
alert("Can't copy the text");
return false;
}
function paste() {
alert("can't paste text");
return false;
}
< /script >

< asp:TextBox ID="TextBox2" runat="server" Text="hi" oncopy="return copy();" onpaste="return paste();"> < /asp:TextBox >


Attachments

  • c sharp (20313-19332-csharp.doc)


  • Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Sign In to add tags.
    TextBox  .  Server  .  Runat  .  Paste  .  Ltscript  .  Language  .  Javascript  .  Gain knowledge in c#  .  Copy  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: SQL Server 2005 shortcuts
    Previous Resource: Convert any text into speech,mp3 or Wma
    Return to Discussion Resource Index
    Post New Resource
    Category: General


    Post resources and earn money!
     
    More Resources



    dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use