title: Issue with Regular Expression Validator for text box in ASP.NET
body: <p>Im having issues with the RegularExpressionValidator in my code!</p>
  
  <p>I have 2 text boxes in my html page and in the code i have the sql command that inserts the parameters to the DB, the issue is that if i put a special character to the text box the sql stops because i need the validators, so i tried validating like this.</p>
  
  <pre><code>Insert the files number.
  &lt;asp:TextBox ID="TextBox1" runat="server" MaxLength="10" &gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>Whats the users Name &lt;br /&gt;
  &lt;asp:TextBox ID="TextBox2" runat="server" MaxLength="10"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p></p>
  
  <p>The validator is defined as:</p>
  
  <pre><code>&lt;asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
      ErrorMessage="RegularExpressionValidator" ValidationExpression="^\d+$" 
      ControlToValidate="TextBox1"&gt;&lt;/asp:RegularExpressionValidator&gt;
  </code></pre>
  
  <p>But when loading it ignores my validation expresion.</p>
  
  <p>Please what is missing.</p>
  
  <p>Thanks</p>