コード例 #1
0
        protected void Button_SubmitAnswer_Click(object sender, EventArgs e)
        {
            bool correctAnswer = DatabaseHandler.AuthenticateSecurityQuestion(TextBox_Username.Text, TextBox_Answer.Text);

            if (correctAnswer)
            {
                Panel_QA.Visible            = false;
                Panel_AnswerCorrect.Visible = true;

                //Email password
                DatabaseHandler.EmailUserPassword(TextBox_Username.Text); //TODO: Have this method email the password, and do nothing else.
                //string result = DatabaseHandler.EmailUserPassword(TextBox_Username.Text); //TODO: Have this method email the password, and do nothing else.
                Label_EmailSent.Text = "Your password is: ";              //Remove this once email works.
            }
            else
            {
                Label_AnswerWrong.Visible = true;
            }
        }