SessionStateSection.CookieName Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the cookie name.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[ConfigurationPropertyAttribute("cookieName", DefaultValue = "ASP.NET_SessionId")]
public string CookieName { get; set; }

Property Value

Type: System.String

The name of the HTTP cookie to use for session identification.

The default value is "ASP.NET_SessionId".

The following code example demonstrates how to get the CookieName property. Refer to the code example in the SessionStateSection class topic to learn how to get the section.

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

.NET Framework
Available since 2.0
Return to top
Show: