You must Sign In to post a response.
  • Category: ASP.NET

    Controls locked on enter key press


    I have one project in - c# (2008).
    In that, i have multiple web pages. I am facing one problem in all the pages,
    suppose, i have a textbox. I type something and then press enter key.
    My all buttons - link buttons gets locked. Not able to click on it.
    Then I have to click somewhere else and then again click on buttons.
    At that time, buttons get work.
  • #763561
    Hi Pranjal,

    Which Browser have you faced this problem?

    First check with other browser other than what you have tried, if the same issue reproduce in other browsers too then take one sample separately( new project) and do the same, whatever you did in your project and then check, if the same issue reproduce then let us know, I request you to please post your sample code, so that we will check from our end to resolve the issue.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #763562
    I face this problem only in IE - 9, IE - 11

  • #763567
    Can you try the following

    $('#page').keypress(function(e) {
    if(e.which == 13) { // Checks for the enter key
    e.preventDefault(); // Stops IE from triggering the button to be clicked

    By Nathan
    Direction is important than speed

  • #763569
    Hi Pranjal,

    Did you use any scripts (JavaScript/ Jquery), may be in your scripts few of things not support to IE9/ IE11. Please be check your browser history(by pressing F12) whether it throws any error, and post that error details, so that we can say some word regarding this issue.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #763596
    Have you write any code on keypress event in javascript, second chance is to submit form, when we press enter in textbox our form gets submitted
    check code on submit click

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

Sign In to post your comments