title: C# Statement Textboxes Sum
body: <p>I am trying to sum the values from 3 textboxes with the following statement, however i cant seem to get it working. The 3 textboxes have values displayed decimal. Error: An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll Additional information: Input string was not in a correct format.</p>
  
  <pre><code>        decimal num1, num2, num3, total;
          num1 = Convert.ToDecimal(SSubTotalTextBox.Text);
          num2 = Convert.ToDecimal(SubTotalMTextBox.Text);
          num3 = Convert.ToDecimal(SubTotalTextBox3.Text);
          total = num1 + num2 + num3;
          TotalAmountTextBox.Text = Convert.ToString(total);
  </code></pre>