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. Web Development
  3. ASP.NET
  4. Disable Drag and Drop in Textbox

Disable Drag and Drop in Textbox

Scheduled Pinned Locked Moved ASP.NET
questioncsharpjavascript
6 Posts 4 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.
  • S Offline
    S Offline
    Sifar 0
    wrote on last edited by
    #1

    Hi, I have a login page in my application. (I m using C#) In that I have disabled Cut, Copy and Paste using Javascript. Its working fine. But, still user can drag and drop any text in these textboxes. How can I restrict the use from this? I dont want to derive any class from Textbox control.. Please advice.

    Regards, -SIFAR.

    S S 2 Replies Last reply
    0
    • S Sifar 0

      Hi, I have a login page in my application. (I m using C#) In that I have disabled Cut, Copy and Paste using Javascript. Its working fine. But, still user can drag and drop any text in these textboxes. How can I restrict the use from this? I dont want to derive any class from Textbox control.. Please advice.

      Regards, -SIFAR.

      S Offline
      S Offline
      Sifar 0
      wrote on last edited by
      #2

      Hi, I found the solution in javascript only. It was same as restricting user from Cut, Copy and Paste. Solution is : ondrop="return false" :)

      Regards, -SIFAR.

      A P 2 Replies Last reply
      0
      • S Sifar 0

        Hi, I found the solution in javascript only. It was same as restricting user from Cut, Copy and Paste. Solution is : ondrop="return false" :)

        Regards, -SIFAR.

        A Offline
        A Offline
        Anurag Gandhi
        wrote on last edited by
        #3

        Thanks. I was also looking for this solution. I rated you 5 for this question.

        Anurag Gandhi. http://www.gandhisoft.com Life is a computer program and every one is the programmer of his own life.

        1 Reply Last reply
        0
        • S Sifar 0

          Hi, I have a login page in my application. (I m using C#) In that I have disabled Cut, Copy and Paste using Javascript. Its working fine. But, still user can drag and drop any text in these textboxes. How can I restrict the use from this? I dont want to derive any class from Textbox control.. Please advice.

          Regards, -SIFAR.

          S Offline
          S Offline
          sapien4u
          wrote on last edited by
          #4

          I was also looking for this function. Thanks. My 5+

          Thanks & Regards, Sandeep Augustine

          S 1 Reply Last reply
          0
          • S sapien4u

            I was also looking for this function. Thanks. My 5+

            Thanks & Regards, Sandeep Augustine

            S Offline
            S Offline
            Sifar 0
            wrote on last edited by
            #5

            Thank you Sandeep. :)

            Regards, -SIFAR.

            1 Reply Last reply
            0
            • S Sifar 0

              Hi, I found the solution in javascript only. It was same as restricting user from Cut, Copy and Paste. Solution is : ondrop="return false" :)

              Regards, -SIFAR.

              P Offline
              P Offline
              Prasanta_Prince
              wrote on last edited by
              #6

              Good solution.

              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