HttpCookie.Values Property
.NET Framework 3.0
Gets a collection of key/value pairs that are contained within a single cookie object.
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The following code 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.
HttpCookie myCookie = new HttpCookie("Cookie1");
myCookie.get_Values().set_Item("Val1", "1");
myCookie.get_Values().set_Item("Val2", "2");
myCookie.get_Values().set_Item("Val3", "3");
get_Response().get_Cookies().Add(myCookie);
var myCookie : HttpCookie = new HttpCookie("Cookie1") myCookie.Values["Val1"] = "1" myCookie.Values["Val2"] = "2" myCookie.Values["Val3"] = "3" Response.Cookies.Add(myCookie)
Community Additions
ADD
Show: