Export (0) Print
Expand All

SessionStateSection.CookieName Property

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft