In which format does HttpRequestHeader.Cookies need to be specified? F.e, if I want to add cookie named CITY with value NY how should I do that with WebClient.Headers.Add()
To add a cookie it's best and easiest to use Response.Cookies.Add();
Response.Cookies.Add();
HttpCookie myCookie = new HttpCookie("lastVisit"); myCookie.Value = DateTime.Now.ToString(); myCookie.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(myCookie);