예제 #1
0
    protected void LoginButton_Click1(object sender, AuthenticateEventArgs e)
    {
        string password = this.Password.Text;
        string usuario = this.UserName.Text;

        GestionUsuario gestor = new GestionUsuario();

        if (gestor.ValidateUser(usuario, password))
        {

            MembershipUser usrInfo = Membership.GetUser(usuario);
            if (usrInfo != null)
            {
                // Email matches, the credentials are valid
                e.Authenticated = true;
            }
            else
            {
                // Email address is invalid...
                e.Authenticated = false;
            }
        }
        else
        {
            // Username/password are not valid...
            e.Authenticated = false;
        }
    }
예제 #2
0
    protected void LoginButton_Click1(object sender, AuthenticateEventArgs e)
    {
        string password = this.Password.Text;
        string usuario  = this.UserName.Text;

        GestionUsuario gestor = new GestionUsuario();

        if (gestor.ValidateUser(usuario, password))
        {
            MembershipUser usrInfo = Membership.GetUser(usuario);
            if (usrInfo != null)
            {
                // Email matches, the credentials are valid
                e.Authenticated = true;
            }
            else
            {
                // Email address is invalid...
                e.Authenticated = false;
            }
        }
        else
        {
            // Username/password are not valid...
            e.Authenticated = false;
        }
    }
예제 #3
0
    protected void LoginButton_Click1(object sender, EventArgs e)
    {
        string         password = this.Password.Text;
        string         usuario  = this.UserName.Text;
        GestionUsuario gestor   = new GestionUsuario();

        if (gestor.ValidateUser(usuario, password))
        {
            FormsAuthentication.SetAuthCookie(usuario, true);
            Response.Redirect("Paginas/Default.aspx");
        }
    }
예제 #4
0
    protected void LoginButton_Click1(object sender, EventArgs e)
    {
        string password = this.Password.Text;
        string usuario = this.UserName.Text;
        GestionUsuario gestor = new GestionUsuario();

          if (gestor.ValidateUser(usuario, password))
          {
              FormsAuthentication.SetAuthCookie(usuario, true);
              Response.Redirect("Paginas/Default.aspx");

          }
    }