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

  • Home
  • SEARCH
  • 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 7520489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:04:47+00:00 2026-05-30T02:04:47+00:00

<body> <form id=form1 runat=server> <div> <asp:Button ID=Button1 runat=server Text=Button1 /> <asp:TextBox ID=TextBox1 runat=server> </asp:TextBox><asp:Button

  • 0
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button ID="Button1" runat="server" Text="Button1" />
        <asp:TextBox ID="TextBox1"
            runat="server">
        </asp:TextBox><asp:Button ID="Button2" runat="server" Text="Button2" />
    </div>
    </form>
</body>

how do i make button2 the default action when the Enter key is pressed?

See image:
https://i.stack.imgur.com/3lH97.jpg

  • 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-30T02:04:48+00:00Added an answer on May 30, 2026 at 2:04 am

    The defaultbutton property can be specified at the Form level in the form tag as well as at panel level in the <asp:panel> definition tag. The form level setting is overridden when specified at the panel level, for those controls that are inside the panel.

    Source: http://forums.asp.net/t/985791.aspx/1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<html xmlns=http://www.w3.org/1999/xhtml> <head runat=server> <title></title> </head> <body> <form id=form1 runat=server> <div> <input id=inpHide type=hidden
Here is a code for my web form control <asp:TextBox runat=server ID=txtUsername></asp:TextBox> <asp:RequiredFieldValidator ID=RequiredFieldValidator1
<style type=text/css> body { font-family:Helvetica, sans-serif; font-size:12px; } p, h1, form, button { border:
<body> <div> <?= $_POST['msg'] ?> </div> <form id=frm method=post> <input type=hidden name='msg' value='{field0: Im
I have a form as under <html xmlns=http://www.w3.org/1999/xhtml> <head runat=server> <title>Untitled Page</title> <script type=text/javascript
i'm having a form with a textbox and a button the textbox has an
I have a table body that grabs it's rows (and form fields) via AJAX
I have an email subject of the form: =?utf-8?B?T3.....?= The body of the email
Any body have idea how to put controls dynamically in asp.net 3.5 ? if
I have a body of text that I have to scan and each line

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.