IHttpSessionState.IsCookieless Property


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

Gets a value indicating whether the session ID is embedded in the URL or stored in an HTTP cookie.

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

bool IsCookieless { get; }

Property Value

Type: System.Boolean

true if the session is embedded in the URL; otherwise, false.

For information on cookieless sessions, see Session Identifiers.

The following code example implements the IsCookieless property of the IHttpSessionState interface.

public bool IsCookieless
  get { return CookieMode == HttpCookieMode.UseUri; }

.NET Framework
Available since 2.0
Return to top