Retrieving cookie from a Container in ASP.NET MVC and C#
//Controller code
CookieContainer cookieContainer = new CookieContainer();
//makes new cookie here
cookieContainer.Add(myCookie);
//Service/Facade code
//myCookie gets passed开发者_StackOverflow中文版 here
How do I pull the cookie out of the container to make sure it's the right cookie?
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
精彩评论