complex data structure in httpcookie

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?
 
A

avnrao

myCookie["firstKey"] = "myval1";
myCookie["secondKey"] = "myval2";
myCookie.Values.Add("thirdKey", "myval3");

hth,
Av.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top