title: How to check status of RegularExpressionValidator
body: <p>I have a program whch has several RegularExpressionValidators which are filtering out the non numeric input of the users.</p>
  
  <pre><code>&lt;asp:RegularExpressionValidator ID="RegularExpressionValidator1" class="errorMess" ErrorMessage="Letters are not Allowed!!" ControlToValidate="CelNo" ValidationExpression="\d+" runat="server" /&gt;
  </code></pre>
  
  <p>However I observed that RegularExpressionValidators only printing out error messages but not hindering a user from the input of the wrong data. </p>
  
  <p>Therefore i was woundering how can I validate RegularExpressionValidator at the backend code, in order to put restriction before i pass the value into the query. </p>
  
  <p>Like for example If the message is visible, execution will stop. Of course there are some other ways how to filter out non numeric data. But I just want to discuss doing it through RegularExpressionValidator .</p>
  
  <p>I tried it like this. But can't understand why is it not working:</p>
  
  <pre><code>    If RegularExpressionValidator1.IsValid Then
  
          MsgBox("Ya")
  
      Else
          MsgBox("Niht")
      End If
  </code></pre>
  
  <p>And this is the front end code:</p>
  
  <pre><code>&lt;asp:TextBox ID="CelNo" runat="server"&gt;&lt;/asp:TextBox&gt;
     &lt;asp:RegularExpressionValidator ID="RegularExpressionValidator1" ErrorMessage="Letters are not Allowed!!" ControlToValidate="CelNo" ValidationExpression="\d+"
          runat="server" /&gt;
  &lt;asp:Button ID="Button5" runat="server" Text="Button" /&gt;
  </code></pre>