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
Loading

Gaurav TyagiPosted Mar 31, 2015, 5:41 AM
Harminder SinghPosted Mar 26, 2015, 10:59 AM
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();
NitinPosted Mar 26, 2015, 8:55 AM
Just assign the value of textbox A in B.
Use
TextBox2.Text= TextBox1.Text;
I hope this only you want?