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. Intercepting Keystrokes

Intercepting Keystrokes

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestion
5 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.
  • M Offline
    M Offline
    Marc Paliotti
    wrote on last edited by
    #1

    Is it possible to intercept keystrokes in asp.net? i have someone who wants a specific button that wants to be the enter button to fire that event. I know in vb.net for windows applications that you can basically choose which button you want. If someone out there has something, it would be very useful.

    T 1 Reply Last reply
    0
    • M Marc Paliotti

      Is it possible to intercept keystrokes in asp.net? i have someone who wants a specific button that wants to be the enter button to fire that event. I know in vb.net for windows applications that you can basically choose which button you want. If someone out there has something, it would be very useful.

      T Offline
      T Offline
      Tad McClellan
      wrote on last edited by
      #2

      Javascript events will be your best bet. OnKeyDown and the like.

      TadMcClellan.Com

      M 1 Reply Last reply
      0
      • T Tad McClellan

        Javascript events will be your best bet. OnKeyDown and the like.

        TadMcClellan.Com

        M Offline
        M Offline
        Marc Paliotti
        wrote on last edited by
        #3

        How would i be able to fire a method in code behind if im using javascipt?

        G T 2 Replies Last reply
        0
        • M Marc Paliotti

          How would i be able to fire a method in code behind if im using javascipt?

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          By making a postback.

          --- b { font-weight: normal; }

          1 Reply Last reply
          0
          • M Marc Paliotti

            How would i be able to fire a method in code behind if im using javascipt?

            T Offline
            T Offline
            Tad McClellan
            wrote on last edited by
            #5

            Don't use the code behind for this. Otherwise you will have to do a post back on each key stroke and you user will hate you. Use Javascript. Then you can do a form.submit to fire the post back or some other mechinisum.

            TadMcClellan.Com

            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