web页面登陆密码问题
现在从A跳转到B。但是在B里做了判断。而且数据库里的密码直接存的md5加密完的密码。然后现在我做了个一键登录,就是只输入用户名,不要密码。求思路。。
if (this.HiddenField2.Value == "" || this.HiddenField2.Value == null)
{
this.HiddenField3.Value = "";
}
else
{
this.HiddenField3.Value = this.HiddenField2.Value.ToString();
}
Response.Cookies["userinfo1"]["name"] = this.HiddenField1.Value.ToString();
Response.Cookies["userinfo1"]["password"] = this.HiddenField2.Value.ToString();
Response.Cookies["userinfo1"].Expires = DateTime.MaxValue;
User user = new User();
string userid = Request.QueryString["PageUrl"];
string password = cryptography.DesEncrypt("" + Request.QueryString["Title"] + "", "futureinfo");
if (userManager.login(userid, password, out user))
{
user.Name = Request.QueryString["PageUrl"];
user.Pwd = Request.QueryString["Title"];
User users = userManager.GetUser(user.Name);
user.Lasttime = users.Lasttime;
user.Id = users.Id;
user.UserName = users.UserName;
user.Dept_name = users.Dept_name;
user.Det = users.Det;
user.岗位id = users.岗位id;
user.部门名称 = users.部门名称;
user.tel = users.tel;