protected void Page_Load(object sender, EventArgs e) { ((UpdateProgress)BaseMaster.FindControl("UpdateProgress1")).AssociatedUpdatePanelID = updLogin.UniqueID; Form.DefaultFocus = "Content_UserName"; Form.DefaultButton = null; UserName.Focus(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ViewState.Add("PasswordAnswerCount", passwordAnswerCount); UserNamePanel.Style["display"] = "block"; QuestionPanel.Style["display"] = "none"; base.SetPageHeaderText("Forgot your password?"); base.SetInformationText(ApplicationMessageService.Instance.GetMessage("INF_017")); txtUserName.Focus(); } }
protected override void OnPreRender(EventArgs e) { NewPassword.Focus(); //try //{ // Label headerLabel = (Label)BaseMaster.FindControl("formHeaderText"); // ((HtmlControl)BaseMaster.FindControl("clientCareEmailLink")).Visible = false; // headerLabel.Text = "Change Password"; // headerLabel.CssClass = "label-style-local"; //} //catch { } UpdatePanel masterPannel = (UpdatePanel)BaseMaster.FindControl("MasterUpdatePanel"); masterPannel.Visible = false; //UserPageInfo.InformationMessageCode = "INF_019"; //SetInformationText(ApplicationMessageService.Instance.GetMessage("INF_019"),string.Empty); base.OnPreRender(e); }
protected void UserNameSubmitButton_Click(object sender, EventArgs e) { bool errorMsg = false; if (txtUserName.Text.Length == 0) { errorMsg = true; } else { muser = Membership.GetUser(txtUserName.Text); if (muser != null) { C3User user = new C3User(muser); if (!user.IsActive) { UserPageInfo.ErrorMessageCode = "ERR_010"; UserHelper.RedirectUser(user, "~/Login.aspx", "Login", true); } else if (user.IsDeleted) { UserPageInfo.ErrorMessageCode = "ERR_011"; UserHelper.RedirectUser(user, GlobalSiteRoot + "Login.aspx", "Login", true); } else if (user.IsLocked) { UserPageInfo.ErrorMessageCode = "ERR_012"; UserHelper.RedirectUser(user, GlobalSiteRoot + "Login.aspx", "Login", true); } else if (string.IsNullOrEmpty(user.PasswordQuestion)) { UserPageInfo.ErrorMessageCode = "ERR_008"; UserHelper.RedirectUser(user, GlobalSiteRoot + "Login.aspx", "Login", true); } else { Question.Text = muser.PasswordQuestion; UserPageInfo.InformationMessageCode = "INF_018"; UserPageInfo.ErrorMessageCode = ""; SetInformationText(ApplicationMessageService.Instance.GetMessage(UserPageInfo.InformationMessageCode)); SetPageErrorText(ApplicationMessageService.Instance.GetMessage(UserPageInfo.ErrorMessageCode)); UserNamePanel.Style["display"] = "none"; QuestionPanel.Style["display"] = "block"; txtAnswer.Focus(); } } else { errorMsg = true; } } if (errorMsg == true) { UserPageInfo.ErrorMessageCode = "ERR_002"; UserPageInfo.InformationMessageCode = "INF_017"; SetPageErrorText(ApplicationMessageService.Instance.GetMessage(UserPageInfo.ErrorMessageCode)); SetInformationText(ApplicationMessageService.Instance.GetMessage(UserPageInfo.InformationMessageCode)); } }