Geeks With Blogs
mikedopp Geekswithblogs (edition)
 
I have been looking for a way to do this finally just had to take the time to write it. Enjoy!
 
 
 1: protected void Login1_LoginError(object sender, EventArgs e)
 2:  
 3: {
 4:  String message = login1.FailureText.ToString();
 5:  
 6:  MembershipUser userInfo = Membership.GetUser(login1.UserName);
 7:  if (userInfo == null)
 8:  
 9:  {
 10:  LoginErrorText.Text = String.Empty;
 11:  
 12:  }
 13:  else if (!(userInfo.IsApproved))
 14:  
 15:  LoginErrorText.Text = "Your account has not been approved yet, Please follow instructions in the confirmation email";
 16:  else if (userInfo.IsLockedOut)
 17:  
 18:  LoginErrorText.Text = "Your account has been locked out for security reasons";
 19:  
 20:  else
 21:  LoginErrorText.Text = String.Empty;
 22:  
 23:  
 24:  
 25:  }
Posted on Friday, September 21, 2007 3:02 PM | Back to top


Comments on this post: Login Failure Redirect using Login Control

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © mikedopp | Powered by: GeeksWithBlogs.net