Ejemplo n.º 1
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            lblMessage.Text    = "";
            lblMessage.Visible = false;

            string hash = Usr.login(txtEmail.Text, txtPassword.Text);

            if (hash.Length > 0)
            {
                Session["auth"] = hash;
                Response.Redirect("mainpage.aspx");
            }

            lblMessage.Text    = "Incorrect user name or password";
            lblMessage.Visible = true;
        }