日期:2014-05-16 浏览次数:20525 次
HttpCookie cookie = new HttpCookie("SessionGUID");
cookie.Value = sessionguid;
cookie.Expires = DateTime.Now.AddMonths(1);
Response.Cookies.Add(cookie);
CookieContainer cc = new CookieContainer ();
HttpWebRequest //这里构造抓取网页地址
HttpWebResponse response = GetResponse();
cc.add(response.Cookies)
其实就是利用CookieContainer进行的,在获取输入流的时候附加到这里即可