Example #1
0
        protected void Reset_Click(object sender, EventArgs e)
        {
            string userId      = txtEmail.Text.ToString();
            string pass        = string.Empty;
            User   user        = new User(userId, pass);
            string userMessage = SendEmail.BuildUserResetMail(user);

            if (ResetPass(user, userMessage, string.Empty, Constants.MailSubject))
            {
                ApplicationSession.Current.user.Email = userId;
                //Mailing Windows Service
                //SendEmail.SendUserResetMail(ApplicationSession.Current.user);
                ResetSuccess.Visible     = true;
                loginStatus.Visible      = false;
                ResetStatus.Visible      = false;
                lblLogin.Visible         = true;
                lblReset.Visible         = false;
                RegisterSuccess.Visible  = false;
                lblChange.Visible        = false;
                txtEmail.Text            = string.Empty;
                ChangePwdSuccess.Visible = false;
                changePass.Visible       = false;
            }
            else
            {
                loginStatus.Visible      = false;
                ResetStatus.Visible      = true;
                ResetSuccess.Visible     = false;
                RegisterSuccess.Visible  = false;
                lblChange.Visible        = false;
                ChangePwdSuccess.Visible = false;
                changePass.Visible       = false;
            }
            ApplicationSession.Current.user = null;
        }