asp.net.ph

HttpCookie.Values Property

System.Web Namespace   HttpCookie Class


Gets a collection of key-and-value value pairs that are contained within a single cookie object.

[ VB ]
Public ReadOnly Property Values As NameValueCollection

[ C# ]
public NameValueCollection Values {get;}

[ C++ ]
public: __property NameValueCollection* get_Values ( );

[ JScript ]
public function get Values ( ) : NameValueCollection;

Property Value

A collection of cookie values.

Example

The following example creates a new cookie and adds several values to it. For an example of how to extract multiple values from one cookie, see HasKeys.

[ VB ]
Dim myCookie As HttpCookie = New HttpCookie ( "Cookie1" ) 
 myCookie.Values ( "Val1" ) = "1"
 myCookie.Values ( "Val2" ) = "2"
 myCookie.Values ( "Val3" ) = "3"
 Response.Cookies.Add ( myCookie )

[ C# ]
HttpCookie myCookie = new HttpCookie ( "Cookie1" );
myCookie.Values [ "Val1" ] = "1";
myCookie.Values [ "Val2" ] = "2";
myCookie.Values [ "Val3" ] = "3";
Response.Cookies.Add ( myCookie );
See Also

HttpCookie 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