"=?Utf-8?B?Y2hpdmVyeQ==?=" <ch********@yahoo.com> wrote in
news:4E**********************************@microsof t.com:
I'm trying to figure out the expression to validate user input
that allows all characters, but not - - (double dash, which is
SQL Server T-SQL comment) to prevent SQL Injection.
Are you using a RegularExpressionValidator control in an ASP.NET
page? If so, it may be easier to use a CustomValidator
control instead, using logic like this:
arguments.IsValid = (inputText.IndexOf("--") == -1);
Hope this helps.
Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/