Im having issues with the RegularExpressionValidator in my code!
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.
Insert the files number.
<asp:TextBox ID="TextBox1" runat="server" MaxLength="10" ></asp:TextBox>
Whats the users Name <br />
<asp:TextBox ID="TextBox2" runat="server" MaxLength="10"></asp:TextBox>
The validator is defined as:
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ErrorMessage="RegularExpressionValidator" ValidationExpression="^\d+$"
ControlToValidate="TextBox1"></asp:RegularExpressionValidator>
But when loading it ignores my validation expresion.
Please what is missing.
Thanks