complex data structure in httpcookie

  • Thread starter Thread starter Waqqas Farooq
  • Start date Start date
W

Waqqas Farooq

Can I add more than 1 values in a cookie?
e.g if i create a httpcookie then the syntax would be like this:

Dim myCookie as new HttpCookie("myCookieName")
myCookie.Value = "myval1"
Response.Add(myCookie)


Now if i want to add more than 1 values in the cookie then how can I do
that?
 
myCookie["firstKey"] = "myval1";
myCookie["secondKey"] = "myval2";
myCookie.Values.Add("thirdKey", "myval3");

hth,
Av.
 
Back
Top