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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:58:21+00:00 2026-05-16T01:58:21+00:00

Given Two text Boxes. (TextBox1 & TextBox2), I want add two numbers (using the

  • 0

Given Two text Boxes. (TextBox1 & TextBox2), I want add two numbers (using the two text boxes) and show the result in the thrid textbox (TextBox3) instantly i.e without pressing a asp.net button. This is to be done using Javascript. I’m new to javascript so dont have much idea.

This is the asp.net page.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

        Box1
        <br />
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <br />
        <br />
        Box2<br />
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <br />
        <br />
        Box3<br />
        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>

    </div>
    </form>
</body>
</html>
  • 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-16T01:58:21+00:00Added an answer on May 16, 2026 at 1:58 am

    W- try this (it’s all based around the js ‘onkeyup’ event handler):

    [edit 2] – changed event handler yet again to onkeyup. you’d need to do a little check in the sum(0 function that the textbox value was a number (isNan).

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        First Number :<input id="txtFirstNumber" type="text" onkeyup="sum();" /><br />
        Second Number:<input id="txtSecondNumber" type="text" onkeyup="sum();" /><br />
        Third Number:<input id="txtThirdNumber" type="text" /><br />
        <input id="changeWatcher" type="text" />
    </body>
    
    <script type="text/javascript">
    
        function sum() {
            var txtFirstNumberValue = document.getElementById('txtFirstNumber').value;
            var txtSecondNumberValue = document.getElementById('txtSecondNumber').value;
            var result = parseInt(txtFirstNumberValue) + parseInt(txtSecondNumberValue);
            if(!isNaN(result))
            {
                document.getElementById('txtThirdNumber').value = result;
                //alert(parseInt(txtFirstNumberValue) + parseInt(txtSecondNumberValue));
            document.getElementById('changeWatcher').value = new Date();
            }
        }
    
    </script>
    
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 500k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer No need for jQuery, plain ol' JavaScript will do. Use… May 16, 2026 at 2:05 pm
  • Editorial Team
    Editorial Team added an answer I have already imported it, i don't understand why is… May 16, 2026 at 2:05 pm
  • Editorial Team
    Editorial Team added an answer Please look through all the similar questions.Refer this Your code… May 16, 2026 at 2:05 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Given a tabbed delimited text file with two columns name and date: Sam 20100101
I am trying, and failing, to create a list of labels and text boxes
Given: A text (optional with HTML tags) a database table with abbreviations and acronyms
Consider a gridview row containing two columns... Each column has two textboxes... Onkeypress in
I am usingh VB.net, I have two textboxes please see below: <tr id=trCheckedBy2 runat=server>
Howto reach the controls in a tabcontrol, I want to color all the textboxen
I have a ObservableCollection that's bound to a ListBox in WPF. I want the
I am using a website to find a keyword position in google search ...
I have the two images below. They are the same image, with one having
I want to import emails from an mbox format into a Django app. All

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.