Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to restrict Copy and Paste in textbox control

how to restrict Copy and Paste in textbox control

Scheduled Pinned Locked Moved C#
questioncsharptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AR Reddy
    wrote on last edited by
    #1

    Hi, I want to restrict copy and paste the text in a TextBox control. The user should not copy the text from TextBox control and should not Paste any text into TextBox control. The user can enter any data and can delete. How can I do this in C#? Thanks in Advance, Reddy.

    rr

    O N 2 Replies Last reply
    0
    • A AR Reddy

      Hi, I want to restrict copy and paste the text in a TextBox control. The user should not copy the text from TextBox control and should not Paste any text into TextBox control. The user can enter any data and can delete. How can I do this in C#? Thanks in Advance, Reddy.

      rr

      O Offline
      O Offline
      Omkar Ghaisas
      wrote on last edited by
      #2

      Hi, Pls see this link, this should help you out. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=741989&SiteID=1 Best regards Omkar Ghaisas

      1 Reply Last reply
      0
      • A AR Reddy

        Hi, I want to restrict copy and paste the text in a TextBox control. The user should not copy the text from TextBox control and should not Paste any text into TextBox control. The user can enter any data and can delete. How can I do this in C#? Thanks in Advance, Reddy.

        rr

        N Offline
        N Offline
        Navi15
        wrote on last edited by
        #3

        Hi Reddy, I couldn't restrict copy and paste in a textbox but colud restict copy and paste on whole form. here's the solution add oncontextmenu="return false" to the body tag

        Naveen G MCSD.Net

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups