HttpCookie.Expires Properti

Definisi

Mendapatkan atau menetapkan tanggal dan waktu kedaluwarsa untuk 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

Nilai Properti

Waktu hari (pada klien) di mana cookie kedaluwarsa.

Contoh

Contoh kode berikut mengatur waktu kedaluwarsa cookie menjadi 10 menit dari waktu saat ini.

MyCookie.Expires = DateTime.Now.AddMinutes(10.0);
MyCookie.Expires = DateTime.Now.AddMinutes(10.0)

Berlaku untuk