ASP.NET Syntax ASP.NET Syntax for Web Controls
Provides user interface elements to log on to a Web site.
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>
For information on the individual members of this class, see Login in the class library.
The Login control is a composite control that provides all the common user interface elements that are needed to authenticate a user on a Web site.
The following example demonstrates how to use a Login control to provide a user interface to log on to a Web site.
<asp:login id="Login1" runat="server"
borderstyle = "outset"
backcolor = "ghostwhite"
borderwidth = "1px"
createusertext = "Create a new user..."
createuserurl = "newUser.aspx"
helppageurl = "help.aspx"
passwordrecoveryurl = "getPass.aspx"
usernamelabeltext = "E-mail address:"
onloggingin = "onLoggingIn"
onloginerror = "onLoginError">
<titletextstyle font-bold
forecolor = "snow"
backcolor = "steelblue" />
</asp:login>
Login Class Login Web Server Control