views:

41

answers:

1
//Controller code
CookieContainer cookieContainer = new CookieContainer();
//makes new cookie here
cookieContainer.Add(myCookie);


//Service/Facade code
//myCookie gets passed here

How do I pull the cookie out of the container to make sure it's the right cookie?

A: 

Assuming you trying to use cookies with web services, check out this Microsoft Support article:

HOW TO: Use CookieContainer to Maintain a State in Web Services When You Use Visual C# .NET

Kelsey