Link to home
Start Free TrialLog in
Avatar of testn1
testn1

asked on

overwrite cookie

need help, this is not overwriting the cookie value...

Response.Cookies("ID").Value = ID   ....

ASKER CERTIFIED SOLUTION
Avatar of nauman_ahmed
nauman_ahmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of testn1
testn1

ASKER

nope.. keeps the same value...
Avatar of testn1

ASKER

i'm trying to overwrite it, it already exists... even if i recreate it, keep the same value
Avatar of testn1

ASKER

and even if i expire it : Response.Cookies("webFASBizID").Expires = DateTime.Today.AddDays(-1)

still exists with the value
Have a look at the following article that best describes about cookie. Also its not good to just expire cookie by DateTime.Today.AddDays(-1). Use DateTime.Today.AddYears(-30) so that it will be expired no matter what time difference is there.

URL: http://www.codeproject.com/aspnet/AspNetCookies.asp?df=100&forumid=13312&exp=0&select=638073

Best, Nauman
Are you running both asp and asp.net together?

If so, keep in mind that they do not automatically share their cookies.  asp.net cannot automatically use cookies set in asp.  You can add the following line to your Page_Load method:
Response.Cookies.Set( Request.Cookies.Get( "MY_COOKIE" ));