Ejemplo n.º 1
0
    protected void LoginAction_Click(object sender, EventArgs e)
    {
        Page.Validate();
        if (!Page.IsValid)
        {
            return;
        }

        ICredentialStore CredStore = this.CreateStore();

        if (CredStore.Authenticate(UsernameText.Text, PasswordText.Text))
        {
            FormsAuthentication.RedirectFromLoginPage(UsernameText.Text, false);
        }
        else
        {
            LegendStatus.Text = "Invalid username or password!";
        }
    }