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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:31:34+00:00 2026-05-24T13:31:34+00:00

I am writing an asp.net page, and I’m having some trouble submitting the form.

  • 0

I am writing an asp.net page, and I’m having some trouble submitting the form. What I have is a multiline text box. When the user hits enter, the form should submit, but instead it is inserting a new line (this is usually the opposite problem people have). Here is the relevant body code:

<div align="left">
        Name:

            <asp:TextBox ID="Name" runat="server"></asp:TextBox>

            <asp:Button ID="Clear" runat="server" onclick="Clear_Click" 
                Text="Clear Chat Log" UseSubmitBehavior="False" />

        </div>
        <br />
        <asp:UpdatePanel runat="server" UpdateMode="Conditional">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="UpdateTimer" EventName="Tick"/>
                <asp:AsyncPostBackTrigger ControlID="Go" EventName="Click" />
            </Triggers>
            <ContentTemplate>
                <asp:TextBox id="Chat" runat="server" ReadOnly="true" TextMode="MultiLine" Width="400" Height="630" />
                <asp:Timer runat="server" Interval="500" OnTick="Timer_Tick" ID="UpdateTimer"/>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdatePanel runat="server" UpdateMode="Conditional">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Go" EventName="Click" />
            </Triggers>
            <ContentTemplate>
                <br/>
                <asp:TextBox id="Message" runat="server" Width="400" Wrap="true" Height="40px" 
                    TextMode="MultiLine" AutoCompleteType="Disabled" AutoPostBack="True"/>
                <asp:Button id="Go" runat="server" Text="Go" Width="40px" Height="40px" OnClick="goClicked" UseSubmitBehavior="true"/>
            </ContentTemplate>
        </asp:UpdatePanel>

My guess is that the problem is the update panels. Basically, the “Go” button should fire if the user hits enter in the “Message” textbox (these are both at the bottom of the listing)

Thanks for your help,
Max

  • 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-24T13:31:35+00:00Added an answer on May 24, 2026 at 1:31 pm

    You need to trap the key Enter at multiline textbox and then submit the form; with Javascript. A sample:

    <input type="text" id="txtMultiline" onkeydown="if(event.keyCode == 13) document.getElementById('btnSubmit').click()"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing some Javascript code for an ASP.net page. I have the string foo
I'm writing an ASP.NET 2.0 page in VS2008. In my Page_Load method I have
I am writing an ASP.NET 4 application with C#. I have a Master Page,
I have a asp.net page I'm writing and I'm perplexed by this problem. I
I am writing asp.net project in C#. I have a button in a page
Duplicate Why don’t self-closing script tags work? I'm writing an ASP.net page, which have
I've heard that writing out the entire ASP.NET page in one go helps performance.
I'm writing a ASP.NET Web Application and I'm running into trouble getting the CSS
I'm writing an intranet ASP.NET page using VB.NET. I've run into a particularly nasty
I am writing HTML to an ASP.NET page (from a web service response), and

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.