You can get and set the comment through the HttpCookie indexer:
HttpCookie myCookie = new HttpCookie("myCookie");
myCookie.Values["Comment"] = "myCookie purpose";
String purpose = myCookie.Values["Comment"];
Compliance!
--
Scott
http://www.OdeToCode.com/blogs/scott/
>it does not seem that the HttpCookie class is in compliance with the rfc
>2109, it does not expose the optional comment attribute, even asp.net 2.0
>beta 2 has this problem and frankly speaking I do not understand why a new
>version of the framework that pretends to stay runinng for years until a new
>version, has to be not compliant with standards when the java platform
>already supports such standard.
mauro - 18 Jul 2005 18:17 GMT
> You can get and set the comment through the HttpCookie indexer:
>
[quoted text clipped - 6 lines]
> --
> Scott
Thanks, I didn't know we could use the indexer to access the attributes.
Bruce Barker - 18 Jul 2005 20:41 GMT
this just adds a value pair named Comment, doesn't really add the attribute.
you should open a bug on the beta 2 newgroup - although it may be too late
to add this feature.
http://lab.msdn.microsoft.com/productfeedback/
-- bruce (sqlwork.com)
> You can get and set the comment through the HttpCookie indexer:
>
[quoted text clipped - 15 lines]
>>version, has to be not compliant with standards when the java platform
>>already supports such standard.
Joerg Jooss - 18 Jul 2005 22:09 GMT
> You can get and set the comment through the HttpCookie indexer:
>
[quoted text clipped - 3 lines]
>
> Compliance!
Um... no. Adding a value like that will concatenate it to the existing
value string with an ampersand, just like form data. RFC 2965 (2109 is
obsolete) prescribes a semicolon.
But more importantly, ASP.NET only uses the Set-Cookie header, not
Set-Cookie2, which is the correct way to set RFC 2965 cookies. Thus,
only Netscape (Version 0) cookies are currently supported.
Cheers,

Signature
http://www.joergjooss.de
mailto:news-reply@joergjooss.de
Scott Allen - 19 Jul 2005 01:30 GMT
Thanks, Joerg. I apolozgize for the misinformation.
--
Scott
http://www.OdeToCode.com/blogs/scott/
>> You can get and set the comment through the HttpCookie indexer:
>>
[quoted text clipped - 13 lines]
>
>Cheers,