5
Answers

Sum Of textboxes values

Saurabh  Pandey

Saurabh Pandey

11y
1.9k
1
this is my code
 int sum = int.Parse(TextBox5.Text) + int.Parse(TextBox6.Text) + int.Parse(TextBox7.Text);
            Label1.Text = String.Format("{0}", sum);

when I enter all three textboxes it runs clearly but if i keep any one or two of them null it gives error...
input was not in correct formate ..
how can I solve this error.....
Answers (5)