Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6088659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:00:38+00:00 2026-05-23T12:00:38+00:00

I have a simple form with one text box that pass data to SQL

  • 0

I have a simple form with one text box that pass data to SQL and I want it to submit when the user hits the enter key.

In Firefox, this works great. The user puts a number hits enter gets back the results.

However in IE 8 and IE 9 this is not working.

<form id="form1" runat="server" accept="cmdclick" 
style="background-position: center; background-image: url('BG.gif'); background-repeat: no-repeat;">
<div style="text-align: center">
<br /><br /> <br /><br /><br /> <br /><br /><br />
    <asp:TextBox ID="txttrack" runat="server" Height="20px" 
        Width="175px" Wrap="False"></asp:TextBox>  
    <asp:Button ID="cmdclick" runat="server" 
        CommandName="cmdclick" BackColor="White" BorderStyle="None"  />

I am not sure what would cause this. I see a lot of people using JavaScript to go around the problem however I do not know how to write JavaScript code.

How can this be done (preferably without JavaScript)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:00:38+00:00Added an answer on May 23, 2026 at 12:00 pm

    Set the DefaultButton-Property in Form-Tag:

    <form defaultbutton="cmdclick" runat="server">
    

    You can also set the DefaultButton on ASP.NET-Panels. This might not be important in this case but

    • when you’re using MasterPages, because the ID of a Button in a ContentPage is unknown in a MasterPage (Form-Tag is inside the Masterpage)
    • when you want to have more than one DefaultButton you can set different DefaultButtons to every Panel
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple form with one text box and a panel with three
I want to have a text box that the user can type in that
I have a form that is used for data entry, and on one form
So I have a form that I want the user to use to update
I have a VERY simple windows form that the user uses to manage Stores.
I have a relatively simple form which asks a variety of questions. One of
I have a simple form on a view page, implemented as a user control,
There are some HTML based games (ie bootleggers.us) that have a simple login form
I have a simple input form that consists of a single textbox and an
I have the following form which intercepts the ENTER key so that when the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.