title: how to the calculate the value of textboxs if one of the text boxes is empty?
body: <p>I want to calculate the value of 3 textboxes. It is not mandatory to give input to all 3 textboxes if one textbox is empty it should calculate for the remaining two textboxes. I'm getting this error "Input string was not in a correct format" for the textboxes where i didn't give input.</p>
  
  <p>And this is my code</p>
  
  <pre><code> double total = 0;
          if (TextBox1.Text == null)
             TextBox1.Text = "0";
          if (TextBox2.Text== null)
             TextBox2.Text = "0";
          if (TextBox3.Text == null)
             TextBox3.Text = "0";
          total = int.Parse(TextBox1.Text) * 0.10;
          total = total + (int.Parse(TextBox2.Text) * 20);
          total = total + (int.Parse(TextBox2.Text) * 30);
          Lbl.Text = total.ToString();
  </code></pre>