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>");
}
赤坂龙之介
不会编程的划水员
相关分类