J
Jeff Bowman
Here's the code:
Private Sub SetCookie(ByVal tcEmail As String)
Dim loCookie As New HttpCookie("Email")
loCookie.Value = Utils.StringToBase64(tcEmail)
loCookie.Expires = Now.AddYears(10)
Response.Cookies.Add(loCookie)
End Sub
The cookie appears to accept the specified expiration date (i.e. #7/13/2015
10:18:21 PM#) just fine, but when I read the cookie in a new browser session its
Expiration property returns simply #12:00:00 AM#.
What happened to the date portion, and more importantly how can I get it back? I
need it so I can do calculations elsewhere in my code.
Many TIA for any suggestions,
Jeff
Private Sub SetCookie(ByVal tcEmail As String)
Dim loCookie As New HttpCookie("Email")
loCookie.Value = Utils.StringToBase64(tcEmail)
loCookie.Expires = Now.AddYears(10)
Response.Cookies.Add(loCookie)
End Sub
The cookie appears to accept the specified expiration date (i.e. #7/13/2015
10:18:21 PM#) just fine, but when I read the cookie in a new browser session its
Expiration property returns simply #12:00:00 AM#.
What happened to the date portion, and more importantly how can I get it back? I
need it so I can do calculations elsewhere in my code.
Many TIA for any suggestions,
Jeff