This documentation is archived and is not being maintained.

HttpCookieCollection.AllKeys Property

Gets a string array containing all the keys (cookie names) in the cookie collection.

[Visual Basic]
Public ReadOnly Property AllKeys As String ()
[C#]
public string[] AllKeys {get;}
[C++]
public: __property String* get_AllKeys();
[JScript]
public function get AllKeys() : String[];

Property Value

An array of cookie names.

Example

The following example creates a string array containing the names of the cookies in a client's cookie collection.

[Visual Basic] 
Dim MyCookieNamesArray() As String = Request.Cookies.AllKeys
    

[C#] 
String[] MyCookieNamesArray = Request.Cookies.AllKeys;
    

[C++] 
String* MyCookieNamesArray[] = Request->Cookies->AllKeys;
    

[JScript] 
var myCookieNamesArray : String[] = Request.Cookies.AllKeys
    

Requirements

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

See Also

HttpCookieCollection Class | HttpCookieCollection Members | System.Web Namespace

Show: