Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 1.1
.NET Framework
Reference
System.Web
HttpContext Class
Properties
 Request Property
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
HttpContext.Request Property

Gets the HttpRequest object for the current HTTP request.

[Visual Basic]
Public ReadOnly Property Request As HttpRequest
[C#]
public HttpRequest Request {get;}
[C++]
public: __property HttpRequest* get_Request();
[JScript]
public function get Request() : HttpRequest;

Property Value

The HttpRequest object for the current HTTP request.

Remarks

The Request property provides programmatic access to the properties and methods of the HttpRequest class. Because ASP.NET pages contain a default reference to the System.Web namespace (which contains the HttpContext class), you can reference the members of HttpRequest on an .aspx page without the fully-qualified class reference to HttpContext. For example, you can use just Request.Browser to get the capabilities of the client browser. If you want to use the members of HttpRequest from an ASP.NET code-behind module, however, you must include a reference to the System.Web namespace in the module and also fully qualify the reference to the currently active request/response context and the class in System.Web you want to use. For example, in a code-behind page you must specify the full name HttpContext.Current.Request.Browser.

Requirements

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

See Also

HttpContext Class | HttpContext Members | System.Web Namespace

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker