I'm building this three textbox where if the two textbox are filled the sum will be displayed however, when I input 10 + 10. The result is 1010. Can anbody help me with this?
Here's my code:
public void textBoxTranspo_TextChanged(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(textBoxTranspo.Text) && !string.IsNullOrEmpty(textBoxDaily.Text))
textBoxTotalAmount.Text = (Convert.ToInt32(textBoxTranspo.Text) + Convert.ToInt32(textBoxDaily.Text).ToString());
}
public void textBoxDaily_TextChanged(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(textBoxTranspo.Text) && !string.IsNullOrEmpty(textBoxDaily.Text))
textBoxTotalAmount.Text = (Convert.ToInt32(textBoxTranspo.Text) + Convert.ToInt32(textBoxDaily.Text).ToString());
}