Пример #1
0
        protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
        {
            string respLogin = bll.validarLogin(Login1.UserName, Login1.Password, false);

            //string senha = "eternidade77";
            //string email = "*****@*****.**";
            //string respLogin = bll.validarLogin(email, senha, false);

            if (respLogin.Equals(""))
            {
                Session["email"]           = Login1.UserName;
                Session["CodPessoaLogada"] = bll.getPessoaEmail(Session["email"].ToString());
                //Session["email"] = email;
                e.Authenticated = true;
            }
            else
            {
                Login1.FailureText = respLogin;
                Login1.DataBind();
                e.Authenticated = false;
            }
        }