how to disable copy paste option for textbox in vb.net?
how to disable copy paste option for textbox in vb.net?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sanjay KumarPosted Dec 2, 2013, 4:45 AM
http://www.aspsnippets.com/Articles/jQuery-Disable-Cut-Copy-Paste-and-Drop-options-in-HTML-and-ASPNet-TextBox.aspx
Sanjeeb LenkaPosted Dec 2, 2013, 3:40 AM
http://www.dotnet-tricks.com/Tutorial/jquery/D9UO110612-Disable-cut,-copy-and-paste-in-textbox-using-jquery,-javascript.html
Satyapriya NayakPosted Dec 2, 2013, 3:37 AM
Ring ZhongPosted Dec 2, 2013, 3:13 AM
Select the textbox in the designer, and in the property grid, set "ReadOnly" to True. This will disallow any typing/pasting into the control, and will grey out the appropriate entires from the context menu.
If, for some reason, you still want the user to type into the textbox (but just not paste into it) and want the cut/copy/paste entries in the menu to go away completely, you need to set "ShortcutsEnabled" to False for the textbox control, and provide your own ContextMenuStrip (which you can drag over from the toolbox into the form designer), selecting it in the "ContextMenuStrip" value in the property grid for the TextBox control -- that will override the default context menu.
referral: http://social.msdn.microsoft.com/Forums/en-US/1bf46245-4696-44f0-ab36-5fb51cb546cd/disable-copypaste-in-textbox
Hope this helps,