Multiply two numbers in ASP.NET?

  • Thread starter Thread starter sammy
  • Start date Start date
S

sammy

Guest
Hi
Can anyone help me out with the codeing for multiplying two numbers in ASP.NET

Here is the code
private void txtta_TextChanged(object sender, System.EventArgs e)
{
int p = Convert.ToInt32(txtqua.Text);
int p = Convert.ToInt32.(txtpa.Text);
int t = Convert.ToInt32(txtta.Text);
t = q*p;
}

I use this code but still the output does not comes can anyone help me
 
hey mate,

I'm assuming you have two three textboxs being text.qua, txtpa, txtta whereby txtta is the textbox which gives the result of multiplying txtpa with txtqua.

That being the case, I believe the following code should work.

private void txtta_TextChanged(object sender, System.EventArgs e)
{
int p = Convert.ToInt32(txtqua.Text);
int p = Convert.ToInt32.(txtpa.Text);
int t = p*q;
txtta.Text = t.toString();

}

Hope this works for you,

Let me know if its not what your after,

David
 
Back
Top