Mahesh Yadav
asked on
Cookie not expires after given time.
I am working on asp.net web application and using cookies to store the data. I want to expire the cookie when the time of the expiration reached. Here i had given the time to expire is 6 minutes after now, but it never expires untill I close the browser.
HttpCookie CurrentUserCookie;
CurrentUserCookie = new HttpCookie("CurrentUser");
CurrentUserCookie.Expires = DateTime.Now.AddMinutes(6) ;
Response.Cookies.Add(Curre ntUserCook ie);
Please advice.
HttpCookie CurrentUserCookie;
CurrentUserCookie = new HttpCookie("CurrentUser");
CurrentUserCookie.Expires = DateTime.Now.AddMinutes(6)
Response.Cookies.Add(Curre
Please advice.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.