title: How to check if a textbox is empty VB.Net
body: <p>I want to test if a textbox is empty for validation purposes, rather than using if x = "". Instead I was wondering if there was a better way to do this. Currently I have:</p>
  
  <pre><code>If txtDob Is Nothing Or txtFirst Is Nothing Or txtGender Is Nothing Or txtLast Is Nothing Or txtPostcode Is Nothing Or txtStreetName Is Nothing Or txtStreetNo.Text Is Nothing Then
          MessageBox.Show("One or more fields have not been completed")
          Return
      End If
  </code></pre>
  
  <p>However, this doesnt seem to work, can someone show me the correct method or another way to do this please?</p>