title: Updating the value of a cookie not working
body: <p>I need to get the value of a cookie and update it. I must be doing something wrong because my cookie does not get updated. This is my code:</p>
  
  <pre><code>if (HttpContext.Current.Request.Cookies.AllKeys.Contains(EconnectConstants.FILE_SHARE_DOCUMENTS))
  {
    var existingCookie = HttpContext.Current.Request.Cookies[EconnectConstants.FILE_SHARE_DOCUMENTS];
    existingCookie.Value = encriptedInput;
    existingCookie.Expires = DateTime.Now.AddMonths(1);
    HttpContext.Current.Response.Cookies.Set(existingCookie);
  }
  else
  {
    var cookie = new HttpCookie(EconnectConstants.FILE_SHARE_DOCUMENTS, encriptedInput);
    cookie.Expires = DateTime.Now.AddMonths(1);
    cookie.Value = encriptedInput;
    HttpContext.Current.Response.Cookies.Add(cookie);
  }  
  </code></pre>
  
  <p>Can anyone please tell me what I am doing wrong?</p>