No documentation on "Response.Cookies.Set"

  • Thread starter Thread starter Cal Who
  • Start date Start date
C

Cal Who

I need to know what "Response.Cookies.Set" does if the cookie already exists
and what it does if it doesn't.

I can't find any documentation using vs2008 help.
On the Internet I get many hits of examples using it but no explination.

Can you tell me where it is defined?

hanks
 
bruce barker said:
try the documentation (to find info in the docs, look at the class of the
property in this case HttpCookieCollection, then look at the properties of
that class):

http://msdn.microsoft.com/en-us/library/system.web.httpcookiecollection_members.aspx

The Set method first checks to see if a cookie already exists in the
collection and if so updates it. The Set method does not allow duplicate
cookies in the cookie collection. To add duplicate cookies in the cookie
collection, use the Add method.


Doesn't say what happens if it does not find it in the collection.
Would be nice if it added it.

Actually now that I have something working using Add, I suppose I can change
the Add to Set and see how that works.

Unless someone already knows and reports here.

Thanks
 
Back
Top