On Jul 31, 6:33*am, "Igor" <nomyn...@gmail.comwrote:
I need to check some text box but if I put validation control than it is on
client site and some user can change regular expression and make sql
injection. I need to check this string at server side by VB or C# code. Is
it possible and how?
Thanks
Generally speaking, client side validation is used to prevent
unnecessary posts to your server, you don't want to depend on it to
save your sight from sql injection attacks as you've pointed out. I'm
assuming you are using the textbox you are wanting to validate
somewhere in your backend code, and where you are using it you need to
validate the input there. The classes you need for Regex validation
are in the System.Text.RegularExpressions namespace.
Thanks,
Seth Rowe [MVP]
http://sethrowe.blogspot.com/