Hi all i have a form field that i want to all user to add special characters for example: C++ / C#
Currently i'm using a regular expression validator to prevent sql injection. It also specifies which special characters to allow:
<asp:RegularExpressionValidator id="nameRegex" runat="server"
ControlToValidate="txtSkills"
ValidationExpression="^[a-zA-Z'.\s | \d | \- | \/ | \$ | \£ | \? | \( | \) | \ | \! | \% | \+ | \& | \, | \! $]{1,200}$"
ErrorMessage="Invalid input!">
</asp:regularexpressionvalidator>
Now this works fine but it seems abit teadious to specify each individual special character. I'm guessing there must be a better way.
Also i'm i correct in thinking that to stop sql injection attacks all i need is to restrict quotation marks: ""
Thanks,
Jake
...
Go to the complete details ...