コード例 #1
0
        protected void btnSignIn_Click2(object sender, EventArgs e)
        {
            //Using a Session to determine whether User has LoggedIn or Not
            Session["Status"] = 0;
            int    username = Convert.ToInt32(txtUserName.Text);
            string password = txtPassword.Text;

            var res = b.Authenticate(username, password);

            if (res == false)
            {
                Response.Write("Invalid Credentials");
            }
            else
            {
                Session["Status"] = 1;
                Response.Redirect("AvailaibleFlights.aspx");
            }
        }