public HttpCookie SetCookie(string name, string value) { if (name == null) throw new ArgumentNullException ("name"); if (value == null) throw new ArgumentNullException ("value"); var cookie = new HttpCookie (name, value); SetCookie (name, cookie); return cookie; }
public HttpCookie SetCookie(string name, string value, string domain, DateTime expires) { if (name == null) throw new ArgumentNullException ("name"); if (value == null) throw new ArgumentNullException ("value"); var cookie = new HttpCookie (name, value); cookie.Domain = domain; cookie.Expires = expires; SetCookie (name, cookie); return cookie; }
public void SetCookie(string name, HttpCookie cookie) { Cookies [name] = cookie; }