trend Posted August 7, 2005 Posted August 7, 2005 How can I make sure only A-Z,a-z,0-9, _ , and . are used in a txtbox? Basically, I am trying to prevent against sql injections.... I have seen: Me.ValidationExpression = "^([a-zA-Z0-9_\-])([a-zA-Z0-9_\-\.]*)@(\[((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}|((([a-zA-Z0-9\-]+)\.)+))([a-zA-Z]{2,}|(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\])$" and I am guessing I want something like: ([a-zA-Z0-9_\-]) then plus _ and . but I am unsure how to implement this. Any help would be great! thanks Lee Quote
Administrators PlausiblyDamp Posted August 7, 2005 Administrators Posted August 7, 2005 If you use parameterised queries then you will not need to filter the input to prevent against injections. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.