c#怎么将Cookie加入到CookieContainer
cookie是浏览器里取出来的是一个字符串,如下:bdshare_firstime=1385953045752;IK_NEW_PHONESET=1;IK_41559539...
cookie是浏览器里取出来的是一个字符串,如下:
bdshare_firstime=1385953045752; IK_NEW_PHONESET=1; IK_415595391FAD431563BB8BFC7B70F7F6=12; BAIDUID=B3F28710BD92D305B311F9967E17B558:FG=1; BDV_ACC=YxbFNMZWZRWjhzQ3BzU29HT3p5N3NGcjczdVdONFQ2d2kyUEhYcHNydG9qOGRTQUFBQUFBJCQAAAAAAAAAAAEAAACVPG0EYmRfeWgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGgCoFJoAqBSUm3.37e67e90281e3df5ba3fb3fc1e87c9a2.2592000.1388812662.1006689202-735264; BDRCVFR[OVOzLHN3HUT]=mk3SLVN4HKm; H_PS_PSSID=1467_4211; IK_USERVIEW=1; IK_B3F28710BD92D305B311F9967E17B558=8; Hm_lvt_b8a6bc2d9b2c98aa6f831e2a2eaefa7c=1386219587,1386222749,1386223004,1386297854; Hm_lpvt_b8a6bc2d9b2c98aa6f831e2a2eaefa7c=1386298249; IK_PASS=B3F28710BD92D305B311F9967E17B558%3AFG%3D1bd_yh; IK_PRIVILEGE=1; IM_old=0|houudtkm 展开
bdshare_firstime=1385953045752; IK_NEW_PHONESET=1; IK_415595391FAD431563BB8BFC7B70F7F6=12; BAIDUID=B3F28710BD92D305B311F9967E17B558:FG=1; BDV_ACC=YxbFNMZWZRWjhzQ3BzU29HT3p5N3NGcjczdVdONFQ2d2kyUEhYcHNydG9qOGRTQUFBQUFBJCQAAAAAAAAAAAEAAACVPG0EYmRfeWgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGgCoFJoAqBSUm3.37e67e90281e3df5ba3fb3fc1e87c9a2.2592000.1388812662.1006689202-735264; BDRCVFR[OVOzLHN3HUT]=mk3SLVN4HKm; H_PS_PSSID=1467_4211; IK_USERVIEW=1; IK_B3F28710BD92D305B311F9967E17B558=8; Hm_lvt_b8a6bc2d9b2c98aa6f831e2a2eaefa7c=1386219587,1386222749,1386223004,1386297854; Hm_lpvt_b8a6bc2d9b2c98aa6f831e2a2eaefa7c=1386298249; IK_PASS=B3F28710BD92D305B311F9967E17B558%3AFG%3D1bd_yh; IK_PRIVILEGE=1; IM_old=0|houudtkm 展开
1个回答
展开全部
CookieContainer.add(cook)
cook是个对象,你要先创建这个对象,把你的值赋给它
cook是个对象,你要先创建这个对象,把你的值赋给它
更多追问追答
追问
嗯,谢谢,cookie这个对象那该怎么赋值呢,
cookie cook ="xxxx";
好像不行啊。。。。。请指教,初学者。。。
追答
CookieContainer cookies = new CookieContainer();
Cookie cook = new Cookie();
cook.Value = "";
cook.Name = "Co";
cookies.Add(cook);
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询