コード例 #1
0
        protected void ConfirmPassword_Click(object sender, EventArgs e)
        {
            String pass        = new_password.Text;
            String confirmpass = password_.Text;
            String name        = u_name.Text;

            if (pass == confirmpass)
            {
                myDAL obj    = new myDAL();
                bool  result = obj.changePassword(name, pass, confirmpass);

                if (result == true)
                {
                    Response.Write("<script>alert('Password Changed')</script>");
                    Message.Text = "Password Changed";
                    Response.Redirect("./Login.aspx");
                }
            }
            else
            {
                Response.Write("<script>alert('Entered Passwords in both fields don't match')</script>");
                Message.Text = "Entered Passwords in both fields don't match";
            }
        }