HttpCookie.Expires Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the expiration date and time for the cookie.
public:
property DateTime Expires { DateTime get(); void set(DateTime value); };
public DateTime Expires { get; set; }
member this.Expires : DateTime with get, set
Public Property Expires As DateTime
Property Value
The time of day (on the client) at which the cookie expires.
Examples
The following code example sets the expiration time of the cookie to 10 minutes from the current time.
MyCookie.Expires = DateTime.Now.AddMinutes(10.0);
MyCookie.Expires = DateTime.Now.AddMinutes(10.0)
Applies to
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.