Click here to Skip to main content
14,699,107 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,

I recently made a website which calculates your home budget on the basis of various conditions. For the demo I made 4 boxes, 1st for salary and corresponding 2nd and 3rd for expenditures.
How can I input the values of 1st, 2nd n 3rd text boxes and display the subtracted value of 1st - (2nd + 3rd text box) into the fourth one?
Updated 2-Dec-12 8:08am
__TR__ 2-Dec-12 13:13pm
C# or VB.NET ?

1 solution

As you not mentioned which language you use i try it with C#,when you press a button the calculation is done and show the result in 4th textbox..
protected void Button1_Click(object sender, EventArgs e)
    double value1, value2, value3, value4;
    value1 = Convert.ToDouble(TextBox2.Text);
    value2 = Convert.ToDouble(TextBox3.Text);
    value3 = Convert.ToDouble(TextBox4.Text);
    TextBox5.Text = value4.ToString();

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900