Monday, March 26, 2012

Validating DataColumn.Expression with a RegularExpressionValidator

System.Data.DataColumn.Expression is the type of string expression you would pass to the function DataTable.Select(string expression) in order to get a DataRow array matching the filter expression

I'm obtaining the filterexpression string from a TextBox in a web page, and I want to validate the content of the TextBox using a RegularExpressionValidator.

Is the RegEx out there ?

Yes you can use regular expressions. It is off of System.Text.RegularExpressions. Check out the MSDN's .Net Regular Expression forum for help with regex'es and the top announcement .Net Regex Resource Reference which has information geared towards all levels, expert to beginner.

No comments:

Post a Comment