2

Possible Duplicate:
Using CookieContainer with WebClient class

Is there any way to get/set cookies with WebClient in C# .net 2.0? (It doesn't seem to be in the MSDN documentation).

Community
  • 1
  • 1
Eugene
  • 10,957
  • 20
  • 69
  • 97
  • http://stackoverflow.com/questions/1777221/c-using-cookiecontainer-with-webclient-class – fejesjoco Jan 01 '11 at 21:47
  • That seems to show how to set the cookie, but not how to get it.... – Eugene Jan 01 '11 at 22:07
  • First you need CookieContainer to save the cookie. Then you can use the same thing to read it, it has a GetCookies method. – fejesjoco Jan 01 '11 at 22:54
  • I see. Thank you. (Still wonder why there isn't a "native" method...seems like a no-brainer to put cookie support in) – Eugene Jan 02 '11 at 01:47

0 Answers0