title: VB.NET: Input string was not in a correct format
body: <p>With the following snippet</p>
  
  <pre><code>Foo = IIf(String.IsNullOrEmpty(txtFoo.Text), 0, Integer.Parse(txtFoo.Text.Trim))
  </code></pre>
  
  <p>I get the error when I submit the field without a value: "Input string was not in a correct format."
  I don't have any space or something else and String.IsNullOrEmpty(txtFoo.Text) returns true. What is wrong?
  Thank you.</p>