cookie class : Expires(string) setter
Description
Set the expiration date.
Syntax
instance.Expires = value;
Assigned value
| Class | Description |
| string | A string that can be evaluated at date and time. |
Return value
None.
Sample code
| 1: | browser br; |
| 2: | cookie coo = br.GetCookie("Example"); |
| 3: | datetime dt; |
| 4: | dt = dt.AddYears(1); // A year later. |
| 5: | coo.Expires = dt.ToString(); |
| 6: | coo.Set(); |
Notes
You need to call the Set() method to commit your changes.
Links for reference
None.


