title: Difference between HttpResponse: SetCookie, AppendCookie, Cookies.Add
body: <p>there are some different ways to create multi value cookies in ASP.NET:</p>
  
  <pre><code>var cookie = new HttpCookie("MyCookie");
  cookie["Information 1"] = "value 1";
  cookie["Information 2"] = "value 2";
  
  // first way
  Response.Cookies.Add(cookie);
  
  // second way
  Response.AppendCookie(cookie);
  
  // third way
  Response.SetCookie(cookie);
  </code></pre>
  
  <p>When should I use which way? I've read that <code>SetCookie</code> method updates the cookie, if it already exits. Doesn't the other ways update the existing cookie as well?</p>
  
  <p>And is the following code best practice for writing single value cookies?</p>
  
  <p><code>Response.Cookies["MyCookie"].Value = "value";</code></p>