예제 #1
0
    protected void Btn_login_Click1(object sender, EventArgs e)
    {
        string username = Tbx_userID.Text;
        string pwd      = Tbx_userpwd.Text;

        if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(pwd))
        {
            Mgr.ShowAlert(this, "用户名或密码为空");
            return;
        }

        if (!Mgr.CheckStr(username) || !Mgr.CheckStr(pwd))
        {
            Mgr.ShowAlert(this, "包含非法字符");
            return;
        }

        if (Mgr.Login(this, Tbx_userID.Text, Tbx_userpwd.Text))
        {
            Response.Redirect("Navigate.aspx");
        }
        else
        {
            //Lbl_message.Text = "用户名或密码错误";
        }
    }