5
Reply

Sum Of textboxes values

Saurabh  Pandey

Saurabh Pandey

Apr 10 2013 7:40 AM
1.9k
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)