System.Web 2.0.0.0 System.Web.UI.WebControls.CompositeControl System.ComponentModel.Designer("System.Web.UI.Design.WebControls.LoginDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner") System.ComponentModel.DefaultEvent("Authenticate") System.ComponentModel.Bindable(false)

In this topic:

Introduction

Style and Templates

Validation Groupings

Accessibility

Applying CSS Styles

Declarative Syntax

## Introduction

The control is a composite control that provides all the common UI elements needed to authenticate a user on a Web site. The following three elements are required for all login scenarios:

A unique user name to identify the user.

A password to verify the identity of the user.

A login button to send the login information to the server.

The control also provides the following optional UI elements that support additional functions:

A link for a password reminder.

A Remember Me checkbox for retaining the login information between sessions.

A Help link for users who are having trouble logging in.

A Register New User link that redirects users to a registration page.

Instruction text that appears on the login form.

Custom error text that appears when the user clicks the login button without filling in the user name or password fields.

Custom error text that appears if the login fails.

A custom action that occurs when login succeeds.

A way to hide the login control if the user is already logged in to the site.

For a table showing which controls are required and which are optional, see property.

If you are not familiar with the set of login controls available in ASP.NET, see ASP.NET Login Controls Overview before continuing. For a list of other topics related to login controls and membership, see Managing Users By Using Membership.

Accepting user input is a potential security threat. Malicious users can send data that is intended to expose vulnerabilities or run programs that try generated passwords. To improve security when working with user input, you should use the validation features of your control and secure any data providers that are configured for your control. For more information, see Securing Login Controls, Basic Security Practices for Web Applications, and Securing Membership.

The control uses a membership provider to obtain user credentials. Unless you specify otherwise, the control uses the default membership provider defined in the Web.config file. To specify a different provider, set the property to one of the membership provider names defined in your application's Web.config file. For more information, see Membership Providers.

If you want to use a custom authentication service, you can use the method to call the service.

## Styles and Templates

The appearance of the control is fully customizable through templates and style settings. All UI text messages are also customizable through properties of the class. The default interface text is automatically localized based on the locale setting on the server.

If the control is customized with templates, then the property and the property are ignored. In this case, set the property and the property of each template child control directly.

control properties represented by text boxes, such as and , are accessible during all phases of the page life cycle. The control will pick up any changes made by the end user by means of the event triggered by the textboxes.

If you embed the control in a object, explicitly set the property in a Page_Load event handler if the user is authenticated. The control does not automatically advance to the next object in this scenario.

The following table lists the control style properties and explains which UI element each style property affects. For a list of which properties each style applies to, see the documentation for the individual style properties.

Style property

UI element affected

The space between the control contents and the control's border.

Remember Me checkbox.

Login failure text.

Instructional text on the page that tells users how to use the control.

Labels for all input fields, such as text boxes.

Text entry input fields.

Title text.

Text displayed to the user when a login attempt is unsuccessful due to validation errors.

Links to other pages.

Login button.

## Validation Groupings

The and properties have controls associated with them to prevent users from submitting the page without providing required information.

The control uses a validation group so that other fields on the same page as the control can be validated separately. By default, the property of the control is used as the name of the validation group. For example, a control with the ID "Login1" will use a validation group name of "Login1". If you want to set the validation group that the control is part of, you must template the control and change the validation group name.

## Applying CSS Styles

The control lets you specify CSS style rules in markup. If you use templates to customize the appearance of the control, you can specify CSS styles in the markup in the templates. In that case, no extra outer table is required. You can prevent the table from being rendered by setting the property to false.

## Accessibility

For information about how to configure this control so that it generates markup that conforms to accessibility standards, see Accessibility in Visual Studio 2010 and ASP.NET 4 and ASP.NET Controls and Accessibility.

## Declarative Syntax

`<asp:Login AccessKey="string" BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderPadding="integer" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset" BorderWidth="size" CreateUserIconUrl="uri" CreateUserText="string" CreateUserUrl="uri" CssClass="string" DestinationPageUrl="uri" DisplayRememberMe="True|False" Enabled="True|False" EnableTheming="True|False" EnableViewState="True|False" FailureAction="Refresh|RedirectToLoginPage" FailureText="string" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" Height="size" HelpPageIconUrl="uri" HelpPageText="string" HelpPageUrl="uri" ID="string" InstructionText="string" LoginButtonImageUrl="uri" LoginButtonText="string" LoginButtonType="Button|Image|Link" MembershipProvider="string" OnAuthenticate="Authenticate event handler" OnDataBinding="DataBinding event handler" OnDisposed="Disposed event handler" OnInit="Init event handler" OnLoad="Load event handler" OnLoggedIn="LoggedIn event handler" OnLoggingIn="LoggingIn event handler" OnLoginError="LoginError event handler" OnPreRender="PreRender event handler" OnUnload="Unload event handler" Orientation="Horizontal|Vertical" PasswordLabelText="string" PasswordRecoveryIconUrl="uri" PasswordRecoveryText="string" PasswordRecoveryUrl="uri" PasswordRequiredErrorMessage="string" RememberMeSet="True|False" RememberMeText="string" runat="server" SkinID="string" Style="string" TabIndex="integer" TextLayout="TextOnLeft|TextOnTop" TitleText="string" ToolTip="string" UserName="string" UserNameLabelText="string" UserNameRequiredErrorMessage="string" Visible="True|False" VisibleWhenLoggedIn="True|False" Width="size" > <CheckBoxStyle /> <FailureTextStyle /> <HyperLinkStyle /> <InstructionTextStyle /> <LabelStyle /> <LayoutTemplate> <!-- child controls --> </LayoutTemplate> <LoginButtonStyle /> <TextBoxStyle /> <TitleTextStyle /> <ValidatorTextStyle /> </asp:Login>`

Provides user interface (UI) elements for logging in to a Web site.

- Constructor

  The constructor creates a new instance of the control that can be programmatically inserted into a Web page.

  The following table shows the initial property values for a new instance of .

  Property

  Initial value

  true

  true

  true

  "Your login attempt has failed. Please try again."

  "Default"

  "Password:"

  "Password."

  false

  "Remember me next time."

  "Login"

  "Login"

  "User Name:"

  "User Name."

  Creates a new instance of the control.

  2.0.0.0
- Event
  System.Web.UI.WebControls.AuthenticateEventHandler

  The event is raised when a user uses the control to log in to a Web site. Custom authentication schemes can use the event to authenticate users.

  When a user uses the control to log in to a Web site, all data in the view state and all post data is lost. Do not perform actions in the event that rely on the view state.

  For more information about handling events, see Handling and Raising Events.

  Occurs when a user is authenticated.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(1)
  System.Int32 To be added.

  The value of the property is stored in view state.

  Gets or sets the amount of padding inside the borders of the control.

  2.0.0.0
- Property
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.TableItemStyle To be added.

  The property gets a reference to a object that you use to change the appearance of the control's Remember Me check box.

  This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form Property-Subproperty, where Subproperty represents a property of the class (for example, CheckBoxStyle-ForeColor). You can set the property programmatically in the form Property.Subproperty (for example, CheckBoxStyle.ForeColor).

  Common settings include custom background color, text color, and font properties. The property defines the appearance of the property.

  The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control.

  The following control style properties are overridden by settings:

  When you use templates to define the appearance of the control, the property has no effect.

  Gets a reference to a object that defines the settings for the Remember Me check box.

  2.0.0.0
- Method
  2.0.0.0
  System.Void

  The method creates instances of the controls that compose the control.

  Creates the individual controls that make up the control and associates event handlers with their events.

- Property
  System.Web.UI.UrlProperty
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.ComponentModel.DefaultValue("")
  System.String To be added. To be added.

  Gets the location of an image to display next to the link to a registration page for new users.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property contains the text of a link to the registration page for the site. The URL of the registration page is specified in the property.

  If is empty, the text in the property is displayed to the user, but is not formatted as a link.

  If the property is empty, a link to the registration page is not available to the user.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the text of a link to a registration page for new users.

  2.0.0.0
- Property
  System.Web.UI.UrlProperty
  System.ComponentModel.Editor("System.Web.UI.Design.UrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property contains the URL of the new-user registration page for the Web site. The property contains the text used for the link.

  If the property is empty, the link to the registration page is unavailable to the user.

  Gets or sets the URL of the new-user registration page.

  2.0.0.0
- Property
  System.Web.UI.UrlProperty
  System.Web.UI.Themeable(false)
  System.ComponentModel.Editor("System.Web.UI.Design.UrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property specifies the page that is displayed when a login attempt is successful.

  The default behavior of the control is to return the user to the referring page, or to the page defined in the defaultUrl attribute of the forms element in the Web.config file.

  The property overrides the default behavior of the control, as well as the defaultUrl setting made in the configuration file.

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

  Gets or sets the URL of the page displayed to the user when a login attempt is successful.

  2.0.0.0
- Property
  System.Web.UI.Themeable(false)
  System.ComponentModel.DefaultValue(true)
  System.Boolean To be added.

  When the property is set to true, the text contained in the 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 property is set by the selection in the Remember Me check box.

  If 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 property to true to send a persistent authentication cookie to the user's browser without displaying the check box.

  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 property to true and the 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 and ASP.NET Themes Overview.

  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.

  2.0.0.0
- Property
  System.Web.UI.Themeable(false)
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.LoginFailureAction.Refresh)
  System.Web.UI.WebControls.LoginFailureAction To be added.

  The property defines the behavior of the control when the user does not successfully log in to the Web site.

  The default behavior reloads the page and displays the contents of the property to alert the user that the login attempt failed.

  When is set to , the user is redirected to the login page defined in the Web.config file.

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

  Gets or sets the action that occurs when a login attempt fails.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  The property specifies the string that is displayed when a login attempt fails.

  If you define a template for the control, you can indicate where on the template to display the property by using a control and giving that control the ID "FailureText". When you use a template, the property is not applied to the text specified in the property.

  The default text for the property is localized based on the server's current locale.

  For security reasons, the login failure text should not include a specific reason for the failure. For example, an error message such as "Password not valid for user <username>" reveals to a potential attacker that <username> is a user on the system. For more information, see How to: Display Safe Error Messages.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the text displayed when a login attempt fails.

  2.0.0.0
- Property
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.TableItemStyle To be added.

  The property gets a reference to a object that you use to change the appearance of login failure text. The default is to display the text in red.

  This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form Property-Subproperty, where Subproperty represents a property of the class (for example, FailureTextStyle-ForeColor). You can set the property programmatically in the form Property.Subproperty (for example, FailureTextStyle.ForeColor).

  Common settings include custom background color, text color, and font properties. The property defines the appearance of the property.

  The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control.

  The following control style properties are overridden by settings:

  When you use templates to define the appearance of the control, the property has no effect.

  Gets a reference to a collection of properties that define the appearance of error text in the control.

  2.0.0.0
- Property
  System.Web.UI.UrlProperty
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.ComponentModel.DefaultValue("")
  System.String To be added. To be added.

  Gets the location of an image to display next to the link to the login Help page.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property contains the link text to the login Help page for the site. The URL of the login Help page is specified in the property.

  If is empty, the text in the property is displayed to the user on the page, but is not formatted as a link.

  If the property is empty, the link to the login Help page is not available to the user.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the text of a link to the login Help page.

  2.0.0.0
- Property
  System.Web.UI.UrlProperty
  System.ComponentModel.Editor("System.Web.UI.Design.UrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property contains the URL of the login Help page for the Web site. The property contains the text used for the link.

  If is empty, text in the property is displayed to the user, but is not formatted as a link.

  If the property is empty, the link to the login Help page is not available to the user.

  Gets or sets the URL of the login Help page.

  2.0.0.0
- Property
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.TableItemStyle To be added.

  The property defines the appearance of hyperlinks in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form Property-Subproperty, where Subproperty represents a property of the class (for example, HyperLinkStyle-ForeColor). You can set the property programmatically in the form Property.Subproperty (for example, HyperLinkStyle.ForeColor).

  Common settings include custom background color, text color, and font properties. The property defines the appearance of the following properties:

  The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control.

  The following style properties are overridden by settings:

  When you use templates to define the appearance of the control, the property has no effect.

  Gets a reference to a collection of properties that define the appearance of hyperlinks in the control.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property contains instructions for users logging in to the Web site. This text is displayed in the control, following the title.

  If the property is set to , no instruction text is available to the user.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets login instruction text for the user.

  2.0.0.0
- Property
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.TableItemStyle To be added.

  The property defines the appearance of instruction text in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form Property-Subproperty, where Subproperty represents a property of the class (for example, InstructionTextStyle-ForeColor). You can set the property programmatically in the form Property.Subproperty (for example, InstructionTextStyle.ForeColor).

  Common settings include custom background color, text color, and font properties. The property defines the appearance of the property.

  The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control.

  The following style properties are overridden by settings:

  When you use templates to define the appearance of the control, the property has no effect.

  Gets a reference to a object that defines the settings for instruction text in the control.

  2.0.0.0
- Property
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.TableItemStyle To be added.

  The property defines the appearance of text box labels in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form Property-Subproperty, where Subproperty represents a property of the class (for example, LabelStyle-ForeColor). You can set the property programmatically in the form Property.Subproperty (for example, LableStyle.ForeColor).

  Common settings include custom background color, text color, and font properties. The property defines the appearance of the following properties:

  The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control.

  The following style properties are overridden by settings:

  When you use templates to define the appearance of the control, the property has no effect.

  Gets a reference to a object that defines the settings for control labels.

  2.0.0.0
- Property
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.Login))
  System.ComponentModel.Browsable(false)
  System.Web.UI.ITemplate To be added.

  The property contains the template that defines how the control is displayed to the user.

  The following table lists the required and optional controls used in a control template.

  ID or command name

  Control type

  Required/optional

  UserName

  Any control that implements , including , or a custom or third-party control.

  Required

  Password

  Any control that implements , including , or a custom or third-party control.

  Required

  RememberMe

  Optional

  FailureText

  Any control that implements .

  Optional

  Login

  Any control that causes event bubbling.

  Optional

  The control throws an exception if the layout template does not contain the required controls. No exception is thrown if you give an optional control ID to a control of the wrong type; however, the control is subsequently ignored by the control.

  The login control can be any control that causes event bubbling, such as , , or . The control's command name property must be set to "Login".

  When a template is used for the control, only the following properties affect the behavior of the control:

  All properties inherited from . (For details, see the control members table.)

  .

  .

  .

  .

  .

  .

  .

  .

  All other properties are inactive when a template is set for the control.

  Gets or sets the template used to display the control.

  2.0.0.0
- Method
  System.Void `` To be added. To be added. The to load. 2.0.0.0
- Event
  System.EventHandler

  The event is raised after the authentication provider checks the user's credentials and the authentication cookie is queued to send to the browser in the next response. Use the event to provide additional processing, such as accessing per-user data, after the user is authenticated.

  When a user submits his or her login information, the control first raises the event, then the event, and finally the event.

  When a user uses the control to log in to a Web site, all data in the view state and all post data is lost. Do not perform actions in the event that rely on the view state.

  For more information about handling events, see Handling and Raising Events.

  Occurs when the user logs in to the Web site and has been authenticated.

  2.0.0.0
- Event
  System.Web.UI.WebControls.LoginCancelEventHandler

  The event is raised when a user submits login information but before the user is authenticated on the Web site. Use the event to set up any information that you need before authenticating a user.

  You can cancel a login attempt during the event by setting the property of the object to true.

  After the event is raised, the control raises the event and then the event.

  For more information about handling events, see Handling and Raising Events.

  Occurs when a user submits login information, before authentication takes place.

  2.0.0.0
- Field
  System.String

  is a read-only field and the default value is "Login". This value is passed to the , and if the value is "Login", the control attempts to log in the current user.

  Represents the command name associated with the login button.

  2.0.0.0
- Property
  System.Web.UI.UrlProperty
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property contains the URL of the image rendered as the control login button when the property is set to .

  The property is used as the alternative text for the image in browsers that do not display images.

  Gets or sets the URL of an image to use for the login button.

  2.0.0.0
- Property
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.Style To be added.

  Use the property to control the appearance of the login button in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form Property-Subproperty, where Subproperty represents a property of the class (for example, LoginButtonStyle-ForeColor). You can set the property programmatically in the form Property.Subproperty (for example, LoginButtonStyle.ForeColor).

  Common settings include custom background color, text color, and font properties. The property defines the appearance of the login button.

  The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control.

  The following style properties are overridden by settings:

  When you use templates to define the appearance of the control, the property has no effect.

  Gets a reference to the object that allows you to set the appearance of the login button in the control.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  The property contains the text displayed for the control's login button. Depending on the value of the property, the property can appear as text on a button, as text displayed as an alternative to an image in browsers that do not render images, or as the text of a link. The following table describes how the different values affect the property.

  setting

  How the property is used.

  As the button's Text property.

  As alternative text for the image.

  As link text.

  The default text for the control is localized based on the server's current locale.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the text for the control's login button.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.ButtonType.Button)
  System.Web.UI.WebControls.ButtonType To be added.

  The property determines the type of button to use for the control's login button. The following table describes the different button types.

  setting

  Type of button rendered

  An HTML button with the text specified in the property.

  An image. The URL of the image is specified in the property. The string specified in the property is used as alternate text for the image.

  An HTML link with the text specified in the property.

  When the property is set to or , the content of the property is ignored.

  Gets or sets the type of button to use when rendering the button.

  2.0.0.0
- Event
  System.EventHandler

  The event is raised when the credentials entered by the user are invalid. You can use the event to redirect the user to a custom error page, to offer additional help, or to log failed login attempts.

  For more information about handling events, see Consuming Events.

  Occurs when a login error is detected.

  2.0.0.0
- Property
  System.Web.UI.Themeable(false)
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property contains the name of the data provider that provides the authentication information for the control. Valid membership provider names are defined in the <membership> element in your application's Machine.config or Web.config file.

  If you do not set the property, it will always return .

  For more information, see the class.

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

  Gets or sets the name of the membership data provider used by the control.

  2.0.0.0
- Method
  System.Void ``

  The method raises the event. Use the event to implement a custom authentication scheme.

  Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event to authenticate the user.

  An that contains the event data. 2.0.0.0
- Method
  System.Boolean `` ``

  The method implements the method to pass events from child controls to the page hierarchy.

  If the current event is posted by the control Login button, the control attempts to log in to the Web site. Otherwise, the event is passed up the page control hierarchy.

  Determines whether to pass an event up the page's user interface (UI) server control hierarchy.

  true if the event has been canceled; otherwise, false. The default is false.

  The source of the event. An containing the data for the event. 2.0.0.0
- Method
  System.Void ``

  The method raises the event. Use the event to provide additional processing, such as accessing per-user data, after the user is authenticated.

  Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event after the user logs in to the Web site and has been authenticated.

  A that contains the event data. 2.0.0.0
- Method
  System.Void ``

  The method raises the event. Use the event to perform any processing that you need before authenticating a user or to perform custom validation.

  Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event when a user submits login information but before the authentication takes place.

  A containing the event data. 2.0.0.0
- Method
  System.Void ``

  The method raises the event. Use the event to provide additional processing, such as error logging, when a user's login attempt fails.

  Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event when a login attempt fails.

  An that contains the event data. 2.0.0.0
- Method
  2.0.0.0
  System.Void ``

  The method implements the method to notify the control to perform any necessary prerendering steps before saving view state and rendering content.

  Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Implements the base method.

  An that contains event data.
- Property
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.Orientation.Vertical)
  System.Web.UI.WebControls.Orientation To be added.

  The property determines whether to display the control in a vertical format, with the text entry field above the text entry field, or in a horizontal format, with the text entry field next to the text entry field.

  Gets or sets a value that specifies the position of the elements of the control on the page.

  2.0.0.0
- Property
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
  System.String To be added.

  The property contains the password entered by the user. The password is in clear text. For more information, see Basic Security Practices for Web Applications.

  If you manipulate the or properties programmatically, it is important to do so at the correct time during the page life cycle. The values of and are not available during the Page_Load phase, but are during the Pre_Render phase.

  control properties represented by text boxes, such as and , are accessible during all phases of the page life cycle. The control will pick up any changes made by the end user by means of the event triggered by the textboxes.

  Gets the password entered by the user.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  The property contains the label text for the text box.

  The property defines where the field label is positioned.

  The default text for the control is localized based on the server's current locale.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the text of the label for the text box.

  2.0.0.0
- Property
  System.Web.UI.UrlProperty
  System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.ComponentModel.DefaultValue("")
  System.String To be added. To be added.

  Gets the location of an image to display next to the link to the password recovery page.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property contains the text of a link to the password recovery page for the site. The URL of the password recovery page is specified in the property.

  If is empty, the text in the property is displayed to the user, but is not formatted as a link.

  If the property is empty, the link to the password recovery page is not available to the user.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the text of a link to the password recovery page.

  2.0.0.0
- Property
  System.Web.UI.UrlProperty
  System.ComponentModel.Editor("System.Web.UI.Design.UrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property contains the URL of the password recovery page for the Web site. The property contains the text used for the link.

  If the property is empty, the link to the password recovery page is not available to the user.

  Gets or sets the URL of the password recovery page.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  The property contains the error message displayed in a control on the login page.

  The property value is displayed only when both the following conditions are true:

  A control is present on the page.

  The Password text box is left blank by the user.

  The default text for the property is localized based on the server's current locale.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Both the and values are wrapped in a validation group within the control. For these values to display, the property of the control must be set to the property of the control.

  Gets or sets the error message to display in a control when the password field is left blank.

  2.0.0.0
- Property
  System.Web.UI.Themeable(false)
  System.ComponentModel.DefaultValue(false)
  System.Boolean To be added.

  When the 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 property is true, the property is set to the value of the check box displayed to the user.

  If the 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 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 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.

  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 property to true and the 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 and ASP.NET Themes Overview.

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

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  The property contains the text of the label for the Remember Me control.

  The default text for the property is localized based on the server's current locale.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the text of the label for the Remember Me check box.

  2.0.0.0
- Method
  2.0.0.0
  System.Void `` To be added.

  Renders the login form using the specified HTML writer.

  The HMTL writer.
- Method
  System.Object To be added. To be added. To be added. 2.0.0.0
- Method
  System.Void `` To be added. To be added. An containing the state of the control. 2.0.0.0
- Property
  System.Web.UI.HtmlTextWriterTag To be added.

  Use the property to determine the value that is associated with a control. This property is used primarily by control developers.

  Gets the value that corresponds to a control. This property is used primarily by control developers.

  2.0.0.0
- Property
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.Style To be added.

  The property defines the appearance of the User name and Password controls in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form Property-Subproperty, where Subproperty represents a property of the class (for example, TextBoxStyle-ForeColor). You can set the property programmatically in the form Property.Subproperty (for example, TextBoxStyle.ForeColor).

  Common settings include custom background color, text color, and font properties. The property defines the appearance of the user name and password text boxes.

  The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control.

  The following style properties are overridden by settings:

  When you use templates to define the appearance of the control, the property has no effect.

  Gets a reference to a collection of properties that define the appearance of text boxes in the control.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.LoginTextLayout.TextOnLeft)
  System.Web.UI.WebControls.LoginTextLayout To be added.

  You can use the property to specify the position of labels relative to their associated text boxes for the control. This property is set using one of the enumeration values. The following table lists the possible values.

  LoginTextLayout value

  Description

  Places labels to the left of the associated text entry fields.

  Places labels above the associated text entry fields.

  Specifies the position of each label relative to its associated text box for the control.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  The property specifies the title displayed at the top of the control.

  The default text for the control is localized based on the server's current locale.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the title of the control.

  2.0.0.0
- Property
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.TableItemStyle To be added.

  The property gets a reference to a object that you use to change the appearance of the title contained in the property.

  The property defines the appearance of the title in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form Property-Subproperty, where Subproperty represents a property of the class (for example, TitleStyle-ForeColor). You can set the property programmatically in the form Property.Subproperty (for example, TitleStyle.ForeColor).

  Common settings include custom background color, text color, and font properties. The property defines the appearance of the property.

  The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control.

  The following style properties are overridden by settings:

  When you use templates to define the appearance of the control, the property has no effect.

  Gets a reference to a collection of properties that define the appearance of the title text in the control.

  2.0.0.0
- Method
  System.Void To be added.

  Overrides the base method.

  2.0.0.0
- Property
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  The property contains the user name entered by the user. control properties represented by text boxes, such as and , are accessible during all phases of the page life cycle. The control will pick up any changes made by the end user by means of the event triggered by the textboxes.

  Gets the user name entered by the user.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  The property contains the label text for the text box.

  The property defines where the field label is positioned.

  The default text for the control is localized based on the server's current locale.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Gets or sets the text of the label for the text box.

  2.0.0.0
- Property
  System.ComponentModel.Localizable(true)
  System.String To be added.

  The property contains the error message displayed in a control on the login page.

  The property value is displayed only when both the following conditions are true:

  A control is present on the page.

  The User name text box is left blank by the user.

  The default text for the control is localized based on the server's current locale.

  The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.

  Both the and values are wrapped in a validation group within the control. For these values to display, the property of the control must be set to the property of the control.

  Gets or sets the error message to display in a control when the user name field is left blank.

  2.0.0.0
- Property
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
  System.Web.UI.WebControls.Style To be added.

  The following table lists the style settings that are available for customization with the property.

  Setting

  Description

  BackColor

  The color behind the error messages. The color can be any of the properties.

  BorderColor

  The color of the border around the error messages. The color can be any of the properties.

  BorderStyle

  The style of the border around the error messages. The style can be "None", "Dotted", "Dashed", "Solid", "Double", "Groove", "Ridge", "Inset", or "Outset". The default is "NotSet". Some styles do not show up clearly unless the BorderWidth value is greater than 2.

  BorderWidth

  The width of the border around the error messages.

  CssClass

  The cascading style sheet (CSS) class used to render the error messages. If other settings are specified, they will override a style sheet setting.

  Font-Bold

  true to display the error message text in bold type.

  Font-Italic

  true to display the error message text in italic type.

  Font-Names

  The name of the font face.

  Font-Overline

  true to display the error message text with a line above it.

  Font-Size

  The size of the text in the error messages as a object.

  Font-Strikeout

  true to display the error message text as crossed out.

  Font-Underline

  true to display the error message text with an underline.

  ForeColor

  The color of the text in the error messages. The color can be any of the properties.

  Height

  A object that represents the height of the error messages.

  Width

  A object that represents the width of the error messages.

  Gets a reference to a collection of properties that define the appearance of error messages associated with validators used by the control.

  2.0.0.0
- Property
  System.Web.UI.Themeable(false)
  System.ComponentModel.DefaultValue(true)
  System.Boolean To be added.

  The property specifies whether the control is displayed to authenticated users. When the property is false, the control does not appear on the page when an authenticated user accesses the site. This is used on Web pages that are used both as login pages and as information pages to hide the control after the user has been authenticated.

  The property has no effect on a control that appears on the default login page defined in Web.config or in the application's configuration file.

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

  Gets or sets a value indicating whether to show the control after the user is authenticated.

  2.0.0.0