protected void bntChangePassword_Click(object sender, EventArgs e) { try { if (Session["password"].ToString().Equals(txtPasswordOld.Text)) { Models.Account acc = new Models.Account(); acc.changepassword(txtNewPassword.Text, Session["userid"].ToString()); Response.Write("<script LANGUAGE='JavaScript' >alert('Thay đổi mật khẩu thành công')</script>"); Response.Redirect("/Account/Account.aspx"); } else { Response.Write("<script LANGUAGE='JavaScript' >alert('Sai mật khẩu cũ')</script>"); } } catch { Response.Write("<script LANGUAGE='JavaScript' >alert('Thay đổi mật khẩu không thành công')</script>"); } }