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 7589185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:05:59+00:00 2026-05-30T20:05:59+00:00

This is a textbox field I have and when a user enters in a

  • 0

This is a textbox field I have and when a user enters in a value and hit enter, I want the value to submit when the user hit enter.

<div id="divUserInfo" >
    <table align="center">
        <tr  id="trDomain" runat="server" visible="false">
            <td class="tdLabel tdLabelInfo" >Domain Name</td>
            <td class="tdData">
                <asp:TextBox ID="txtDomain" runat="server" ToolTip="Network domain user is associated."></asp:TextBox>
                <asp:Label ID="lblRqdDom" runat="server" Text="required" CssClass="noshow" ></asp:Label>
            </td>
        </tr>

Yes I know I’m formatting in a table and will not being using tables for my future projects.

  • 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-30T20:06:00+00:00Added an answer on May 30, 2026 at 8:06 pm

    Postback on TextBox loosing focus

    If you just want to do a postback when TextBox looses focus (by pressing Enter, Tab or moving focus to another control), set AutoPostBack property of the TextBox to true.

    After writing something in the TextBox and making it loose focus, you’ll get a postback. I suppose, however, that this can be raised not only on pressing Enter.
    More information on MSDN: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox.autopostback.aspx.

    Postback by simulating submit Button click on pressing Enter

    If you want a postback only on pressing enter, you can put add a Button on the page and put it with the TextBox in the same Panel control. Then you should set DefaultButton property for this Panel. This should invoke button click on pressing Enter when the TextBox (or any other control in the Panel) is focused.

    So, your code can look like this (the code hasn’t been tested):

    ...
    <asp:Panel ID="grouppingPanel" runat="server" DefaultButton="btnSubmitDomain">
        <asp:TextBox ID="txtDomain" runat="server" ToolTip="Network domain user is associated." />
        <asp:Label ID="lblRqdDom" runat="server" Text="required" CssClass="noshow" ></asp:Label>
    
        <asp:Button ID="btnSubmitDomain" runat="server" Text="GO" OnClick="btnSubmitDomain_Click" />
    </asp:Panel>
    ...
    

    You can find more information about it here: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.panel.defaultbutton.aspx.

    If you have any issues applying any of those solutions or further questions, let me know.

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

Sidebar

Related Questions

I have a TextBox and I change it's Left value. And this TextBox is
In my app, I want to be able to have the user enter their
In the user interface, i have a text field to enter date in dd/mm/yyyy
I have an template field in a GridView : <asp:TemplateField HeaderText=Value> <ItemTemplate> <asp:TextBox CssClass=form-field
I have this textbox I use to capture keyboard shortcuts for a preferences config.
I want to access the text elements inside this textbox in GWT from the
I have this custom textbox that I am working on and I can use
This other SO question asks about an autocomplete textbox in WPF. Several people have
This is my problem, I have one textbox, one button and one label. Everything
I have 1000 records in a table which holds position field starting from 1

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.