Answer: Yes , it is possible to create cookies with keys.
Cookies is a dictionary at the time of initialization, if key is specified with it. (You can determine whether cookie is dictionary or not using HasKeys property.)
For an example:
Response.Cookies("Testcookie")("key1") = "key1"
Response.Cookies("Testcookie”)("key2") = "key2"
After this if you make assignment like,
Response.Cookies("Testcookie”) = “noKey”
Then,” key1” and “key2” of cookie("Testcookie”) will be deleted.
Asked In: Many Interviews |
Alert Moderator