Wayne Barron
asked on
vb.net Delete cookie 1 minute after its creation
Hello All.
I need to delete a cookie 1 minute after it has been created.
I have two different types of cookies being created I need this done too.
First
HttpContext.Current.Response.Cookies.Set(New HttpCookie("theACookie", rs("AID")))
Second
Dim shortTime As String = Now.ToString("mm") + Now.ToString("ss") + Now.ToString("fff")
' -- Cookie with Time added to the CookieName
HttpContext.Current.Response.Cookies.Set(New HttpCookie("theBCookie" + shortTime, rs("BID")))
These cookies are created during an Upload.
Once the upload is done, the cookies need to be deleted.
There are about 20+ cookies created in each upload, and after this process is done several times, my Login cookie gets deleted, as the cookies are full in Google Chrome.
So, deleting the cookies that are no longer needed is the best way to deal with this issue.
I am already deleting the ASPSESSION cookies, due to this same limit on cookies issue.
Thank you.
Wayne
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
The issue was, that I had never messed with the AddSeconds or AddMinutes, so I did not know about them, until today. The AddMinutes I found out from your post.
Thank you.