Default Button to Catch <ENTER> key

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Default Button to Catch <ENTER> key

    Hi,

    It's a login screen, so users enter their ID/Password and
    hit <ENTER> instead of clicking on Login button. But when
    they hit <ENTER> an Image Button gets clicked.

    I want to make my Login Button a default so that when
    users hit <ENTER> key, Login Button receives a click.

    Please help!
    Thanks!

    JP

    JP Guest

  2. Similar Questions and Discussions

    1. default html code for enter key
      Hi, I'm a web developer and my company prefers that I use two <br> tags for paragraphs rather than using the <p> tags. There is more control over...
    2. disabling enter button (revisited)
      I posted this question before, but all the answers given were not feasible either because it's a VERY long form (so I don't want to make everything...
    3. How control which button has focus [ENTER]
      Hello, I'm facing a problem with the behavior of the key while editing items in a datagrid. I would like to make sure that the cancel button is...
    4. Script for button won't 'catch'
      Hi, I'm using MX and brushing up and I can't figure out what I am doing wrong here. I have a button that works fine and when I add on (rollOver)...
    5. How to control enter button on the client PC in ASP.Net
      Does anybody know how to control enter button on the web form? It seems to if the user hits enter button at run time then it fires submit button...
  3. #2

    Default Re: Default Button to Catch <ENTER> key

    JP,

    I have code to do exactly this on my web site: [url]www.aboutfortunate.com[/url]

    Just go to the code library. The entry you need is titled: "Fire a button
    click from any text box when enter key is pressed"

    Just jump directly to page two of the datagrid. It's the first entry on
    page two.

    Happy coding!

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche
    "JP" <jpatel3@canada.com> wrote in message
    news:08a901c352ad$97c2c610$a601280a@phx.gbl...
    > Hi,
    >
    > It's a login screen, so users enter their ID/Password and
    > hit <ENTER> instead of clicking on Login button. But when
    > they hit <ENTER> an Image Button gets clicked.
    >
    > I want to make my Login Button a default so that when
    > users hit <ENTER> key, Login Button receives a click.
    >
    > Please help!
    > Thanks!
    >
    > JP
    >

    S. Justin Gengo Guest

  4. #3

    Default Re: Default Button to Catch <ENTER> key

    Check Andy Smith's free DefaultButtons control:
    [url]http://www.metabuilders.com/Tools/DefaultButtons.aspx[/url]

    --
    Teemu Keiski
    MCP, Designer/Developer
    Mansoft tietotekniikka Oy
    [url]http://www.mansoft.fi[/url]

    AspInsiders Member, [url]www.aspinsiders.com[/url]
    ASP.NET Forums Moderator, [url]www.asp.net[/url]
    AspAlliance Columnist, [url]www.aspalliance.com[/url]

    "JP" <jpatel3@canada.com> wrote in message
    news:08a901c352ad$97c2c610$a601280a@phx.gbl...
    > Hi,
    >
    > It's a login screen, so users enter their ID/Password and
    > hit <ENTER> instead of clicking on Login button. But when
    > they hit <ENTER> an Image Button gets clicked.
    >
    > I want to make my Login Button a default so that when
    > users hit <ENTER> key, Login Button receives a click.
    >
    > Please help!
    > Thanks!
    >
    > JP
    >

    Teemu Keiski Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139