This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Download Microsoft Edge
More info about Internet Explorer and Microsoft Edge
public:
property IReference<DateTime> ^ Expires { IReference<DateTime> ^ get(); void set(IReference<DateTime> ^ value); };
IReference<DateTime> Expires();
void Expires(IReference<DateTime> value);
public System.Nullable<System.DateTimeOffset> Expires { get; set; }
var iReference = httpCookie.expires;
httpCookie.expires = iReference;
Public Property Expires As Nullable(Of DateTimeOffset)
Property Value
Remarks
Setting the Expires property to
null
makes this a Cookie that is only good for the current HTTP session and will not be persisted. Setting the Expires property to a date in the past deletes the Cookie.
The default value for the Expires property is
null
.
Javascript and .NET languages do not use
DateTime
directly. In Javascript a
DateTime
is projected as a
Date
object, and in .NET it is projected as a
System.DateTimeOffset
structure. In C++, the
DateTime.UniversalTime
member has the same granularity as a and supports the date ranges required by Javascript and .NET.