Back to product page

Add method (HttpCookies)


Adds new cookie to the collection.

Type

A HttpCookie object.

Reference to new instance of HttpCookie object.

Syntax

  • Basic
object.Add (Name, [Value])
The Add(object,Name,Value) syntax has these parts:
objectAn expression evaluating to an object of type HttpCookies.
NameRequired. A String value. Name of the cookie.
ValueOptional. A Variant value. Value of the cookie.

Remarks

This method will add new cookie to current request/response object. You should set it's Name, and optionaly it's Value.

To specify additional attributes for this cookie (such as 'Path' or 'Expires') you should use Attributes property.

Platforms

Windows