asp.net cookie expiration always 12:00:00 AM

HakaVelli

New Member
No matter what I set the asp cookie expiration time as, the browser always reports the days correctly, but the time is always 12:00:00 AM. (Wednesday, January 22, 2014 12:00:00 AM)Here is the code I am working with:\[code\]Dim UserNameCookie As New HttpCookie("Username") Response.Cookies.Add(UserNameCookie) UserNameCookie.Secure = True UserNameCookie.HttpOnly = True UserNameCookie.Expires = DateTime.Today.AddYears(1) UserNameCookie.Value = http://stackoverflow.com/questions/14463670/UserName.Text\[/code\]Any help is appreciated.
 
Back
Top