日期:2014-05-20 浏览次数:20479 次
string connectionString = ConfigurationManager.ConnectionStrings["CreateWord"].ConnectionString;
SqlConnection con = new SqlConnection(connectionString);
con.Open();
string name = Session["S_name"].ToString();
string cmdtext = "update IH_login set IH_pw='"+ pw +"' where IH_username='" + name + "'";
SqlCommand cmd1 = new SqlCommand(cmdtext, con);
cmd1.ExecuteNonQuery();
if ((int)cmd1.ExecuteNonQuery() > 0)
{
Label4.Text = "密码修改成功!";
}
else
{
Label4.Text = "失败!";
}
con.Close();
string connectionString = ConfigurationManager.ConnectionStrings["CreateWord"].ConnectionString;
SqlConnection con = new SqlConnection(connectionString);
con.Open();
string name = Session["S_name"].ToString();
string cmdtext = "update IH_login set IH_pw='"+ pw +"' where IH_username='" + name + "'";
SqlCommand cmd1 = new SqlCommand(cmdtext, con);
if ((int)cmd1.ExecuteNonQuery() > 0)
{
Label4.Text = name+"密码修改成功!新密码"+pw;
}
else
{
Label4.Text = "失败!";
}
con.Close();