Answer: Setting a permanent cookie is similar to Session cookie, except giving the cookie an expiration date. It is very common that you don't specify any arbitrary expiration date, but instead expire the cookie relative to the current date, using the DateAdd() function.
Response.Cookies("Name") = "myCookie"
Response.Cookies("Name").Expires = DateAdd("m", 1, Now())
Asked In: Many Interviews |
Alert Moderator