System.Web.HttpRequest.ValidateNameValueCollection C# (CSharp) Method

ValidateNameValueCollection() static private method

static private ValidateNameValueCollection ( string name, NameValueCollection coll, RequestValidationSource source ) : void
name string
coll NameValueCollection
source RequestValidationSource
return void
		static void ValidateNameValueCollection (string name, NameValueCollection coll, RequestValidationSource source)
		{
			if (coll == null)
				return;

			RequestValidator validator = RequestValidator.Current;
			int validationFailureIndex;
			HttpContext context = HttpContext.Current;

			foreach (string key in coll.Keys) {
				string val = coll [key];
				if (val != null && val.Length > 0 && !validator.IsValidRequestString (context, val, source, key, out validationFailureIndex))
					ThrowValidationException (name, key, val);
			}
		}

Same methods

HttpRequest::ValidateNameValueCollection ( string name, NameValueCollection coll ) : void