Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

HttpRequest.Item Property

Gets the specified object in the Cookies, Form, QueryString or ServerVariables collections.

[C#] In C#, this property is the indexer for the HttpRequest class.

[Visual Basic]
Public Default ReadOnly Property Item( _
   ByVal key As String _
) As String
[C#]
public string this[
 string key
] {get;}
[C++]
public: __property String* get_Item(
 String* key
);
[JScript]
returnValue = HttpRequestObject.Item(key);
-or-
returnValue = HttpRequestObject(key);

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Arguments [JScript]

key
The name of the collection member to get.

Parameters [Visual Basic, C#, C++]

key
The name of the collection member to get.

Property Value

The QueryString, Form, Cookies, or ServerVariables collection member specified in the key parameter.

Requirements

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

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

Show:
© 2015 Microsoft