asp.net.ph

HttpCookieCollection.Item Property

System.Web Namespace   HttpCookieCollection Class


Gets the cookie with the specified name from the cookie collection. This property is overloaded to allow retrieval of cookies by either name or numerical index.

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

Overload List

1. Gets the cookie with the specified numerical index from the cookie collection.

2. Gets the cookie with the specified name from the cookie collection.


Example

The following example gets the cookie with the name "LastVisit" and extracts its value.

NOTE: This example shows how to use one of the overloaded versions of the Item property ( HttpCookieCollection indexer ). For other examples that might be available, see the individual overload topics.

[ VB ]
Dim last As String = Request.Cookies ( "LastVisit" ).Value


[ C# ]
String last = Request.Cookies [ "LastVisit" ] .Value;
See Also

HttpCookieCollection Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph