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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:06:00+00:00 2026-05-30T06:06:00+00:00

I have two textboxes, Text1 and Text2, in an Update Panel. The code is

  • 0

I have two textboxes, Text1 and Text2, in an Update Panel. The code is here:

 <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="Panle" >
        <ContentTemplate>
        <asp:TextBox ID="TextBox1" runat="server" AutoPostBack="true" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
        <asp:TextBox ID="TextBox2" runat="server" AutoPostBack="True"></asp:TextBox>
        </ContentTemplate> 
        </asp:UpdatePanel>

and I have wrote this code on textchanged event of Text1:

  Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
        TextBox2.Text = TextBox1.Text
    End Sub

Now the problem is that when I enter the text in Text1, and then Press enter to then the text of text2 is equal to text of text1, but i want to do this before pressing the enter in text1. I mean as i key down in text1 then the text of text2 should equal to text2.

  • 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-30T06:06:01+00:00Added an answer on May 30, 2026 at 6:06 am

    If you want to handle the keydown event, you need javascript:

    <asp:TextBox ID="TextBox1" onkeydown="document.getElementById('TextBox2').value=this.value" runat="server" AutoPostBack="false"></asp:TextBox>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have user control named DateTimeUC which has two textboxes on its markup: <asp:TextBox
I have two textboxes in my vb.net code <tr> <td align=right> <b>ActivationReqDT:</b> </td> <td>
I have a simple in VB/ASP.NET form containing two text boxes, I am attempting
I'm using the jQuery datepicker where I have two textboxes (start date / end
I have added two update panels to my page. I'm trying to update the
I have two textboxes, and a button. When I press the button, I want
I have a dropdown box that I construct with PHP. Here is the code:
I have a gridview in which i have two textboxes. The senarios is such
I have a window with two textboxes sitting in the grid. The grid contains
I have two forms here. Registration and Payment . In the registration form i

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.