HttpRequest Class
Assembly: System.Web (in system.web.dll)
The methods and properties of the HttpRequest class are exposed through the Request properties of the HttpApplication, HttpContext, Page, and UserControl classes.
Note: |
|---|
| Unicode support for HttpRequest class members requires IIS version 6.0 or later. |
| Topic | Location |
|---|---|
| How to: Pass Values Between ASP.NET Web Pages | Building ASP .NET Web Applications |
| How to: Pass Values Between ASP.NET Web Pages | Building ASP .NET Web Applications |
The following example uses the StreamWriter class to write the values of several HttpRequest class properties values to a file. For properties that are of type string, the values are HTML encoded as they are written to the file. Properties that represent a collection are looped through, and each key/value pair that they contain is written to the file.
Security Note: |
|---|
| This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview (Visual Studio). |
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
Note: