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

ThrowValidationException() static private method

static private ThrowValidationException ( string name, string key, string value ) : void
name string
key string
value string
return void
		static void ThrowValidationException (string name, string key, string value)
		{
			string v = "\"" + value + "\"";
			if (v.Length > 20)
				v = v.Substring (0, 16) + "...\"";
		
			string msg = String.Format ("A potentially dangerous Request.{0} value was " +
						    "detected from the client ({1}={2}).", name, key, v);
		
			throw new HttpRequestValidationException (msg);
		}
#if NET_4_0