예제 #1
0
    protected void SubmitButton_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            //检测验证码
            WebUtility.CheckCode(Code.Value, null);

            //登录
            bool result = bll_admin.Login(Username.Value, Pwd.Value, AutoLogin.Checked);
            if (result)
            {
                Response.Redirect("main.aspx");
            }
            else
            {
                WebUtility.ShowAlertMessage("登录失败,用户或密码错误!", null);
            }
        }
    }