Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
Login Class
Login Properties
 RememberMeSet Property
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
Login..::.RememberMeSet Property

Updated: November 2007

Gets or sets a value indicating whether to send a persistent authentication cookie to the user's browser.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

Visual Basic (Declaration)
<ThemeableAttribute(False)> _
Public Overridable Property RememberMeSet As Boolean
Visual Basic (Usage)
Dim instance As Login
Dim value As Boolean

value = instance.RememberMeSet

instance.RememberMeSet = value
C#
[ThemeableAttribute(false)]
public virtual bool RememberMeSet { get; set; }
Visual C++
[ThemeableAttribute(false)]
public:
virtual property bool RememberMeSet {
    bool get ();
    void set (bool value);
}
J#
/** @property */
/** @attribute ThemeableAttribute(false) */
public boolean get_RememberMeSet()
/** @property */
/** @attribute ThemeableAttribute(false) */
public  void set_RememberMeSet(boolean value)
JScript
public function get RememberMeSet () : boolean
public function set RememberMeSet (value : boolean)
ASP.NET
<asp:Login RememberMeSet="True|False" />

Property Value

Type: System..::.Boolean

true to send a persistent authentication cookie; otherwise, false. The default value is false.

When the RememberMeSet property is true, the authentication cookie sent to the user's computer is set to expire in 50 years, making it a persistent cookie that will be used when the user next visits the Web site. Because the authentication cookie will be present on the user's computer, the user will be considered already authenticated and will not have to log in to the Web site again.

When the DisplayRememberMe property is true, the RememberMeSet property is set to the value of the check box displayed to the user.

If the DisplayRememberMe property is false, a Remember Me check box is not displayed on the page and the user has no way to control whether the authentication cookie is persistent. If the RememberMeSet property is true, the authentication cookie sent to the user's browser will be a persistent cookie.

If the user logs out of the Web site using the LoginStatus control, the persistent cookie is cleared from the user's computer and the user will have to log in to the site on the next visit.

Note:

There are inherent security risks with setting a persistent authentication cookie on a user's browser. You should determine whether these security risks are acceptable to your site. If you set the RememberMeSet property to true and the DisplayRememberMe property to false, users visiting your Web site from public browsers, as in Internet cafes for example, can accidentally leave persistent authentication cookies behind and the next user of the browser will be able to access your Web site using the previous user's credentials.

This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins Overview.

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker