コード例 #1
0
ファイル: loginpage.aspx.cs プロジェクト: Rmsharks4/Minions
        protected void SearchUserButton(object sender, EventArgs e)
        {
            enter  obj      = new enter();
            String Name     = Textbox1.Text;
            String Password = Textbox2.Text;
            int    found;

            found = obj.SearchUser(Name, Password);
            if (found == -1)
            {
                Error.Text = "Username or Password is incorrect. Try again.";
            }
            else
            {
                Session["userid"]   = found;
                Session["username"] = '******' + Name;
                Session["Uname"]    = Name;
                Response.Redirect("home.aspx?val=" + found);
            }
        }