System.Web.UI.WebControls.Login.DisplayRememberMe Property

Gets or sets a value indicating whether to display a check box to enable the user to control whether a persistent cookie is sent to their browser.

Syntax

[System.Web.UI.Themeable(false)]
[System.ComponentModel.DefaultValue(true)]
public virtual bool DisplayRememberMe { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the Login.DisplayRememberMe property is set to true, the text contained in the Login.RememberMeText property is displayed on the page, along with a Remember Me check box. When the user selects the Remember Me check box, the authentication cookie sent to his or her computer persists so that the user is automatically authenticated on future visits to the site. The value of the Login.RememberMeSet property is set by the selection in the Remember Me check box.

If Login.DisplayRememberMe 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 persists or not. You can still set the Login.RememberMeSet property to true to send a persistent authentication cookie to the user's browser without displaying the check box.

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 Login.RememberMeSet property to true and the Login.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 System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0