i have text box1 for give input and another textbox2 to get result of text box1.
i need this for different values
text box1 value is mulitiplied with predefined different values.
textboox1 contains:: 15 x 6 =90;
the result 90 have to store in textbox2
Calculater
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Harminder SinghRank #1,153 · 1.6K reputationPosted Mar 26, 2015, 6:59 AM EDT
a = Convert.ToInt32 (TextBox1.Text);
b = Convert.ToInt32(TextBox2.Text);
c = a * b;
TextBox3.Text = c.ToString();
but if you want to use only 2 textboxes(1 for entering value and 2nd to show result) the you can't enter two diff. values, same values will multipies twice i.e.
int a, b,c;
a = Convert.ToInt32 (TextBox1.Text);
b = Convert.ToInt32(TextBox1.Text);
c = a * b;
TextBox2.Text = c.ToString();
NitinRank #455 · 5.5K reputationPosted Mar 26, 2015, 4:55 AM EDT
Just assign the value of textbox A in B.
Use
TextBox2.Text= TextBox1.Text;
I hope this only you want?
Gaurav Tyagi121 reputationPosted Mar 31, 2015, 1:41 AM EDT