Gets or sets a version number that indicates which ASP.NET version-specific approach to validation will be used.
Assembly: System.Web (in System.Web.dll)
'Declaration <ConfigurationPropertyAttribute("requestValidationMode", DefaultValue := "4.0")> _ Public Property RequestValidationMode As Version
Property ValueType: System.Version
A value that indicates which ASP.NET version-specific approach to validation will be used. The default is 4.0.
The property specifies which ASP.NET approach to validation will be used. This can be the algorithm that is used in versions of ASP.NET earlier than version 4, or the version that is used in .NET Framework 4. The property can be set to the following values:
4.0 (the default). The HttpRequest object internally sets a flag that indicates that request validation should be triggered whenever any HTTP request data is accessed. This guarantees that the request validation is triggered before data such as cookies and URLs are accessed during the request. The request validation settings of the pages element (if any) in the configuration file or of the @ Page directive in an individual page are ignored.
2.0. Request validation is enabled only for pages, not for all HTTP requests. In addition, the request validation settings of the pages element (if any) in the configuration file or of the @ Page directive in an individual page are used to determine which page requests to validate.
The value that you assign to this property is not validated to match a specific version of ASP.NET. Any numeric value smaller than 4.0 (for example, 3.7, 2.9, or 2.0) is interpreted as 2.0. Any number larger than 4.0 is interpreted as 4.0.
To set this value in a configuration file, you can assign a value to the requestValidationMode attribute of the httpRuntime element. For more information, see httpRuntime Element (ASP.NET Settings Schema).