protected void Button3_Click(object sender, EventArgs e) { userid = us.getUserID(); DataTable db = us.getUser(userid); string password = db.Rows[0][2].ToString(); if (password == TextBox4.Text) { if (us.updateUserPassword(userid, TextBox5.Text) > 0) { Response.Write("<script>alert('密码修改成功,请记住新密码');window.location.href='userinfo.aspx';</script>"); Panel1.Visible = false; } else { Response.Write("<script>alert('密码修改不成功');</script>"); } } else { Response.Write("<script>alert('旧密码输入不正确');</script>"); } }