How to clear a cookie programatically?
- by peter
Hi All,
I am using silverlight unit tests to test an important part of our site. Is it possible to clear cookies before each unit test runs?
The problem is that if I do this,
HtmlPage.Document.Cookies = "";
It doesn't work. If the cookie already was this,
key = value
I can do this,
HtmlPage.Document.Cookies = "key=";
It kind of clears it out, but the string "key" is still part of the cookie.
Any ideas?
Are there any other classes in .NET that deal with cookies? The functionality seems quite limited when I am dealing with more complicated scenarios.