Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Protected Sub Login1_LoginError(ByVal sender As Object,
- ByVal e As System.EventArgs) Handles Login1.LoginError
- If Login1.UserName = String.Empty And Login1.Password = String.Empty Then
- lblLoginErrorDetails.Text = "Please enter your username and password."
- ElseIf Login1.UserName = String.Empty Then
- lblLoginErrorDetails.Text = "Please enter your username."
- ElseIf Login1.Password = String.Empty Then
- lblLoginErrorDetails.Text = "Please enter your password."
- Else
- Dim userInfo As MembershipUser = Membership.GetUser(Login1.UserName)
- LoginError.Visible = "True"
- If userInfo Is Nothing Then
- lblLoginErrorDetails.Text = "There is no user in the database
- with the username " & Login1.UserName & ". Please try again."
- Else
- If Not userInfo.IsApproved Then
- lblLoginErrorDetails.Text = "Your account has not yet been
- approved. Please try again later."
- ElseIf userInfo.IsLockedOut Then
- lblLoginErrorDetails.Text = "Your account has been locked
- out due to maximum incorrect login attempts. Please
- contact the site administrator."
- Else
- lblLoginErrorDetails.Text = "Your password is incorrect,
- please try again."
- End If
- End If
- End If
- End Sub
Add Comment
Please, Sign In to add comment