Export (0) Print
Expand All

HttpRequest.ValidateInput Method

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Validates data submitted by a client browser and raises an exception if potentially dangerous data is present.

[Visual Basic]
Public Sub ValidateInput()
[C#]
public void ValidateInput();
[C++]
public: void ValidateInput();
[JScript]
public function ValidateInput();

Exceptions

Exception Type Condition
HttpRequestValidationException Potentially dangerous data was received from the client.

Remarks

If the validation feature is enabled by page directive or configuration, this method is called during the Page's ProcessRequest processing phase. ValidateInput can be called by your code if the validation feature is not enabled. Request validation works by checking all input data against a hard-coded list of potentially dangerous data.

QueryString, Form, and Cookies input data is checked during request validation.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

Show:
© 2014 Microsoft