Cookie problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Pram (pram_at_nospam.com)
Date: 10/29/04


Date: Fri, 29 Oct 2004 14:56:11 -0500

I have client-side javascript that create a cookie by calling
    document.cookie = "clientId=5";

Now on the "postback", after reading that cookie value I would like to reset
its value by calling:
    this.Response.Cookies["clientId"].Value = "0";

Unfortunately, the cookie "clientId" does not get reset but instead there
are
"double" in the document.cookie object. It looks like:
    document.cookie = "clientId=5; clientId=0"

Can someone help me to solve this problem?

Thanks,
pram



Relevant Pages

  • RE: Multiple cookies created
    ... HttpResponse, HttpCookieCollection and HttpCookie objects. ... HTTP_HOST server variable when the cookie is created. ... This can also be reset when the Domain property is read. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: FormsAuthentication cookie refreshing
    ... at which point the cookie may have expired. ... you will have to refresh an actual page. ... I am trying to refresh the cookie to make sure the timeout is reset by ... understand how XMLHTTPRequest really works at all! ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Application_AuthenticateRequest
    ... Here is some code that we used to reset a cookie in the authenticateRequest ... We had to reset the cookie on every request if they already had one. ... I have seen some samples that dont seem to be ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Authentication Ticket Persistance
    ... code running on login.xyz.net actually writes the authentication cookie, ... then checks the domain of the ReturnURL from the calling application ... Upon receiving your response, I decided to research the issue further. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Best Chocolate Chip Cookie - Ever
    ... not the cure for cancer. ... No name calling or no one get's to eat a cookie. ...
    (rec.food.cooking)