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;
A collection of cookie values.
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 );
HttpCookie Members