0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <input type="text" />
    </form>
</body>
</html>

When I hit the enter key, when the input box has focus - the form submits.

If I add another input box it doesn't submit. How can I avoid the auto submit when there's only one input box?

MartinHN
  • 19,542
  • 19
  • 89
  • 131
  • 1
    possible duplicate of [ENTER key on a FORM with a single Input Field, will automatically SUBMIT with GET ](http://stackoverflow.com/questions/1370021/enter-key-on-a-form-with-a-single-input-field-will-automatically-submit-with-ge) – Neil Knight Jun 01 '10 at 09:12

1 Answers1

0

Look here for the answer SO post

HTH

Community
  • 1
  • 1
Dimi Takis
  • 4,924
  • 3
  • 29
  • 41