title: Check Masked Text Box is empty or not VB.NET
body: <p>I have Masked Text Boxes in my form. One is for salary, PF&amp;ESI and Other is for Phone Number. I try to check the Masked Text Box is empty or not with following code.</p>
  
  <pre><code>Dim mtxt As Control
  Dim flag3 As Boolean
  flag3 = False
  For Each mtxt In EMPGBDATA.Controls
      If TypeOf mtxt Is MaskedTextBox  Then
          If mtxt.Text = "" Then
              mtxt.BackColor = Color.Red
              flag3 = True
          End If
      End If
  Next 
  </code></pre>
  
  <p>Only my salary, PF&amp;ESI Masked Text Box show in Red color, But Phone number Masked Text Box is not show Red. </p>