protected void Button1_Click(object sender, EventArgs e) { if (TextBox1.Text.Trim() == TextBox2.Text.Trim()) { string username = (string)Session["admin"]; string sql = "update student1 set pass='" + TextBox2.Text.Trim() + "' where stno='" + username + "'"; SqlHelper.ExecuteNonQuery(sql); if (SqlHelper.ExecuteNonQuery(sql) == 1) { Response.Write("<script language=javascript>alert('密码修改成功');</" + "script>"); } } else { Response.Write("<script>alert('密码不一致!');</script>"); }
- 2 回答
- 0 关注
- 1291 浏览
添加回答
举报
0/150
提交
取消