<p>Is there a library out there which I can use in my current ASP.NET app, to validate queryStrings?</p>

<p>Edit ~ Using Regex to look for patterns, like string, only, numeric only, string with length x,...etc</p>

<p>Thanks</p>

Don't know about a library, but you can use to check if the querystring exists:
```
```
if (!String.IsNullOrEmpty(Request.Querystring["foo"]))
{
   // check further
}
else
{
   // not there, do something else
}
```
```
If you want to use Reglar Expressions to further validate, you can create a class that accepts the string and return a boolean.
```
```
public static Boolean IsValid(String s)
{
    const String sRegEx = @"regex here";

    Regex oRegEx = new Regex(sRegEx , RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled);
    MatchCollection oMatches = oRegEx.Matches(s);

    return (oMatches.Count > 0) ? true : false;
}
```
```
This is a good free program to help you build the regluar expressions:
Expresso