CreatingCookieEventArgs::IsPersistent Property
Gets a value that indicates whether the authentication cookie should be retained beyond the current session.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Property Value
Type: System::Booleantrue if the cookie should be retained beyond the current session; otherwise, false.
When you create a FormsAuthenticationTicket object, you can use the IsPersistent property to specify whether the authentication cookie is retained beyond the current session.
The following example shows an event handler for the CreatingCookie event. The handler retrieves user values from the CreatingCookieEventArgs object in order to customize the authentication cookie. The IsPersistent property of the FormsAuthenticationTicket object is set to the value in the IsPersistent property.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.