Пример #1
0
        //Login Button

        protected void Button1_Click(object sender, EventArgs e)
        {
            //TextBox1 = username
            //TextBox2 = password
            var ReturnCode = Records.CheckCredentials(TextBox1.Text, TextBox2.Text);

            if (ReturnCode == -1)
            {
                Label1.Text = "Invalid Username or Password";
            }
            else
            {
                Session["Username"] = TextBox1.Text;
                Response.Redirect("~/Forms/UserPage.aspx");
            }
        }