protected void createWizard_CreateUserError(object sender, CreateUserErrorEventArgs e) { divMsg.Visible = true; string sFieldValue = e.CreateUserError.ToString(); CreateUserWizard cw = (CreateUserWizard)sender; if (cw != null) { object objData = ReflectionUtilities.GetPropertyValue(cw, e.CreateUserError.ToString() + "ErrorMessage"); if (objData != null) { sFieldValue = string.Format("{0}", objData); } } FailureText.Text = sFieldValue; }
protected void CreateWizard_CreateUserError(object sender, CreateUserErrorEventArgs e) { string plainEnglishMsg = "An error occurred while creating your account."; switch (e.CreateUserError) { case MembershipCreateStatus.DuplicateEmail: plainEnglishMsg = "This email address is already in use and cannot be used again."; break; case MembershipCreateStatus.DuplicateProviderUserKey: plainEnglishMsg = "The provider key specified is already in use and cannot be used again."; break; case MembershipCreateStatus.DuplicateUserName: plainEnglishMsg = "This email address is already in use and cannot be used again."; break; case MembershipCreateStatus.InvalidEmail: plainEnglishMsg = "This is an invalid email address."; break; default: break; } AlertBox.SetStatus(plainEnglishMsg, UI.AlertBoxType.Error); }
protected void cuwReview_CreateUserError(object sender, CreateUserErrorEventArgs e) { switch (e.CreateUserError) { case System.Web.Security.MembershipCreateStatus.DuplicateEmail: cuwReview.DuplicateEmailErrorMessage = "The email address you've specified is already in use.<br />If you've already registered with ClearCost Health please try logging in or using \"Forgot Password\""; break; case System.Web.Security.MembershipCreateStatus.DuplicateProviderUserKey: break; case System.Web.Security.MembershipCreateStatus.DuplicateUserName: cuwReview.DuplicateUserNameErrorMessage = "Our records show you've already registered.<br />Please try logging in via the login page.<br />If you've forgotten your password please click \"Forgot Password\""; break; case System.Web.Security.MembershipCreateStatus.InvalidAnswer: cuwReview.InvalidAnswerErrorMessage = "The answer you've provided to the Security Question is invalid.<br />Please check your answer and try again."; break; case System.Web.Security.MembershipCreateStatus.InvalidEmail: cuwReview.InvalidEmailErrorMessage = "The email address you've provided is invalid.<br />Please check the email address you supplied and try again."; break; case System.Web.Security.MembershipCreateStatus.InvalidPassword: cuwReview.InvalidPasswordErrorMessage = "The password you've provided is invalid.<br />Please retype the password you supplied and try again."; break; case System.Web.Security.MembershipCreateStatus.InvalidProviderUserKey: break; case System.Web.Security.MembershipCreateStatus.InvalidQuestion: break; case System.Web.Security.MembershipCreateStatus.InvalidUserName: break; case System.Web.Security.MembershipCreateStatus.ProviderError: break; case System.Web.Security.MembershipCreateStatus.Success: break; case System.Web.Security.MembershipCreateStatus.UserRejected: break; default: break; } }
protected virtual void OnCreateUserError (CreateUserErrorEventArgs e) { if (Events != null) { CreateUserErrorEventHandler eh = (CreateUserErrorEventHandler) Events [CreateUserErrorEvent]; if (eh != null) eh (this, e); } }
protected void OnCreateUserError(object sender, CreateUserErrorEventArgs e) { _state = State.Failed; _currentErrorText = "An error has occurred. Please try again."; CreateUserWizard wizard = Control as CreateUserWizard; if (wizard != null) { _currentErrorText = wizard.UnknownErrorMessage; switch (e.CreateUserError) { case MembershipCreateStatus.DuplicateEmail: _currentErrorText = wizard.DuplicateEmailErrorMessage; break; case MembershipCreateStatus.DuplicateUserName: _currentErrorText = wizard.DuplicateUserNameErrorMessage; break; case MembershipCreateStatus.InvalidAnswer: _currentErrorText = wizard.InvalidAnswerErrorMessage; break; case MembershipCreateStatus.InvalidEmail: _currentErrorText = wizard.InvalidEmailErrorMessage; break; case MembershipCreateStatus.InvalidPassword: _currentErrorText = wizard.InvalidPasswordErrorMessage; break; case MembershipCreateStatus.InvalidQuestion: _currentErrorText = wizard.InvalidQuestionErrorMessage; break; } } }
protected virtual void OnCreateUserError(CreateUserErrorEventArgs e) { CreateUserErrorEventHandler handler = (CreateUserErrorEventHandler) base.Events[EventCreateUserError]; if (handler != null) { handler(this, e); } }
protected void CreateUserWizard1_CreateUserError(object sender, CreateUserErrorEventArgs e) { string createUserError = ""; // find the type of error switch (e.CreateUserError) { case MembershipCreateStatus.DuplicateEmail: createUserError = GetText("ALREADY_REGISTERED"); break; case MembershipCreateStatus.DuplicateUserName: createUserError = GetText("ALREADY_REGISTERED"); break; case MembershipCreateStatus.InvalidEmail: createUserError = GetText("BAD_EMAIL"); break; case MembershipCreateStatus.InvalidPassword: createUserError = GetText("BAD_PASSWORD"); break; case MembershipCreateStatus.InvalidQuestion: createUserError = GetText("INVALID_QUESTION"); break; case MembershipCreateStatus.InvalidUserName: createUserError = GetText("INVALID_USERNAME"); break; case MembershipCreateStatus.InvalidAnswer: createUserError = GetText("INVALID_ANSWER"); break; case MembershipCreateStatus.InvalidProviderUserKey: createUserError = "Invalid provider user key."; break; case MembershipCreateStatus.DuplicateProviderUserKey: createUserError = "Duplicate provider user key."; break; case MembershipCreateStatus.ProviderError: createUserError = "Provider Error"; break; case MembershipCreateStatus.UserRejected: createUserError = "User creation failed: Reason is defined by the provider."; break; } PageContext.AddLoadMessage( createUserError ); //Display the failure message in a client-side alert box //Page.ClientScript.RegisterStartupScript(Page.GetType(), "CreateUserError", String.Format("alert('{0}');", createUserError.Replace("'", "\'")), true); }
protected void OnCreateUserError(object sender, CreateUserErrorEventArgs e) { }
protected virtual new void OnCreateUserError(CreateUserErrorEventArgs e) { }
protected void cuwReview_CreateUserError(object sender, CreateUserErrorEventArgs e) { switch (e.CreateUserError) { case System.Web.Security.MembershipCreateStatus.DuplicateEmail: cuwReview.DuplicateEmailErrorMessage = "The email address you've specified is already in use.<br />If you've already registered with ClearCost Health please try logging in or using \"Forgot Password\""; break; case System.Web.Security.MembershipCreateStatus.DuplicateProviderUserKey: break; case System.Web.Security.MembershipCreateStatus.DuplicateUserName: cuwReview.DuplicateUserNameErrorMessage = "<div style=\"text-align:left;color:red;\">Our records show you've already registered.<br />Please try logging in via the <a href=\"Sign_In.aspx\">Sign In</a> page.<br />If you've forgotten your password please click <a href=\"../../ResetPassword.aspx\">Forgot Password</a></div>"; break; case System.Web.Security.MembershipCreateStatus.InvalidAnswer: cuwReview.InvalidAnswerErrorMessage = "The answer you've provided to the Security Question is invalid.<br />Please check your answer and try again."; break; case System.Web.Security.MembershipCreateStatus.InvalidEmail: cuwReview.InvalidEmailErrorMessage = "The email address you've provided is invalid.<br />Please check the email address you supplied and try again."; break; case System.Web.Security.MembershipCreateStatus.InvalidPassword: cuwReview.InvalidPasswordErrorMessage = "The password you've provided is invalid.<br />Please choose a different password of at least {0} characters."; break; case System.Web.Security.MembershipCreateStatus.InvalidProviderUserKey: break; case System.Web.Security.MembershipCreateStatus.InvalidQuestion: break; case System.Web.Security.MembershipCreateStatus.InvalidUserName: cuwReview.InvalidPasswordErrorMessage = "The email address you entered was invalid.<br />Please check the email address you supplied and try again."; break; case System.Web.Security.MembershipCreateStatus.ProviderError: break; case System.Web.Security.MembershipCreateStatus.Success: break; case System.Web.Security.MembershipCreateStatus.UserRejected: break; default: break; } }
protected void CreateUserWizard1_CreateUserError(object sender, CreateUserErrorEventArgs e) { Literal msg = (Literal)this.CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("ErrorMessage"); switch (e.CreateUserError) { case MembershipCreateStatus.InvalidPassword: { break; } case MembershipCreateStatus.InvalidQuestion: break; case MembershipCreateStatus.InvalidAnswer: break; case MembershipCreateStatus.InvalidEmail: msg.Text = "The Email you entered appears to be invalid. Please try another."; break; case MembershipCreateStatus.DuplicateUserName: break; case MembershipCreateStatus.DuplicateEmail: break; default: break; } }
protected void RegisterUser_CreateUserError(object sender, CreateUserErrorEventArgs e) { }
protected void createUserWizard_CreateUserError(object sender, CreateUserErrorEventArgs arguments) { LogCreateUserError(arguments.CreateUserError, "no user info"); }
protected void CreateUserWizard1_CreateUserError(object sender, CreateUserErrorEventArgs e) { log.Info(string.Format("{0}: {1}", Framework.LoggingOptions.CreateUser_Failed.ToString(), this.CreateUserWizard1.UserName)); }