检验密码的处理,望详解
下面是检验密码的处理代码,新手望详解:#endregion
Maticsoft.BLL.db_User db = new Maticsoft.BLL.db_User();
Maticsoft.Model.db_User mode = db.GetModelByUserName(this.mail.Value);
if (mode != null)
{
if (mode.UserPwd == DESEncrypt.Encrypt(this.pwd.Value))
{
Session["USERINFO"] = mode;
Response.Redirect("UserInfo.aspx");
}
else
{
this.pwd_succeed.InnerText = "用户密码错误";
}
}
else
{
this.pwd_succeed.InnerText = "用户密码错误";
}
}
}