Example #1
0
        protected void log_Click(object sender, EventArgs e)
        {
            string    name = account.Text;
            string    pwd  = FormsAuthentication.HashPasswordForStoringInConfigFile(passwd.Text, "MD5");
            BLL_Users log  = new BLL_Users();

            log.log(name, pwd);
            if (log.log(name, pwd))
            {
                Response.Write("<script>window.location.href ='userProf.aspx';</script>");
                Session["name"] = account.Text;
                Session["pass"] = FormsAuthentication.HashPasswordForStoringInConfigFile(passwd.Text, "MD5");
            }
            else
            {
                Response.Write(@"<script>alert('用户名或密码错误!');history.go(-1);</script>");
            }
        }