コード例 #1
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            string username = txtUsername.Text;
            string password = txtPassword.Text;

            if (SQLProcedures.CheckIfAdmin(username, password))
            {
                lblIncorrectLogin.Visible = false;
                Response.Redirect("MainPage.aspx");
            }
            else
            {
                txtUsername.Text = string.Empty;
                txtUsername.Focus();
                lblIncorrectLogin.Visible = true;
            }
        }