System.Web.HttpCookie.Expires Property

Gets or sets the expiration date and time for the cookie.

Syntax

public DateTime Expires { set; get; }

Value

The time and day when when the cookie will expire on the client.

Remarks

If this property isn't set, its value should be set to System.DateTime.MinValue, meaning that the cookie will expire as soon as the browser closes.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0