Bagikan melalui


SessionStateSection.CookieName Properti

Definisi

Mendapatkan atau mengatur nama cookie.

public:
 property System::String ^ CookieName { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("cookieName", DefaultValue="ASP.NET_SessionId")]
public string CookieName { get; set; }
[<System.Configuration.ConfigurationProperty("cookieName", DefaultValue="ASP.NET_SessionId")>]
member this.CookieName : string with get, set
Public Property CookieName As String

Nilai Properti

Nama cookie HTTP yang digunakan untuk identifikasi sesi.

Atribut

Contoh

Contoh kode berikut menunjukkan cara mendapatkan CookieName properti. Lihat contoh kode dalam SessionStateSection topik kelas untuk mempelajari cara mendapatkan bagian .

// Display the current CookieName property value.
Console.WriteLine("CookieName: {0}",
  sessionStateSection.CookieName);
' Display the current CookieName property value.
Console.WriteLine("CookieName: {0}", sessionStateSection.CookieName)

Keterangan

Nilai defaultnya adalah "ASP.NET_SessionId".

Berlaku untuk