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. Submit buttons enter key issue

Submit buttons enter key issue

Scheduled Pinned Locked Moved ASP.NET
databasedesignsysadminhelp
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.
  • R Offline
    R Offline
    Ramasubramaniam
    wrote on last edited by
    #1

    Hi, I have an imagebutton and a submit button in my usercontrol. I have few textboxes to enter search criteria. Imagebutton placed before the submit button on the design code. When the user press "enter" key imagebutton's click event is firing, but I want the submit button't click event to get fired. Both are running at server. Both actions pulling data from the database. Ram

    _ S 2 Replies Last reply
    0
    • R Ramasubramaniam

      Hi, I have an imagebutton and a submit button in my usercontrol. I have few textboxes to enter search criteria. Imagebutton placed before the submit button on the design code. When the user press "enter" key imagebutton's click event is firing, but I want the submit button't click event to get fired. Both are running at server. Both actions pulling data from the database. Ram

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      Here by default imagebutton(whichever will come first) will get fired if you want other button to get fired then you have to use javascript for that.

      Best Regards, Apurva Kaushal

      R 1 Reply Last reply
      0
      • R Ramasubramaniam

        Hi, I have an imagebutton and a submit button in my usercontrol. I have few textboxes to enter search criteria. Imagebutton placed before the submit button on the design code. When the user press "enter" key imagebutton's click event is firing, but I want the submit button't click event to get fired. Both are running at server. Both actions pulling data from the database. Ram

        S Offline
        S Offline
        Suresh Pirsquare
        wrote on last edited by
        #3

        Try this link:- http://www.syncfusion.com/faq/aspnet/Search/318.aspx[^] :) Thanks & regards, Suresh Dayma

        Everything Is Possible!

        1 Reply Last reply
        0
        • _ _AK_

          Here by default imagebutton(whichever will come first) will get fired if you want other button to get fired then you have to use javascript for that.

          Best Regards, Apurva Kaushal

          R Offline
          R Offline
          Ramasubramaniam
          wrote on last edited by
          #4

          I tried all possibities of scripting, could you send something.

          _ 1 Reply Last reply
          0
          • R Ramasubramaniam

            I tried all possibities of scripting, could you send something.

            _ Offline
            _ Offline
            _AK_
            wrote on last edited by
            #5

            Two possibilities are there, first you place the control(whose event you want to get fired on enter key) before the other. The second possibility is to use javascript code that will trap the enter key and fire the event. The javascript function to trap the enter key is this: function TrapEnterKey(field,event) { var keyCode = event.keyCode?event.keyCode:event.which?event.which:event.charcode if(keyCode==13) { document.getElementById("BtnSearch").click(); return false; } }

            Best Regards, Apurva Kaushal

            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