Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        IJsonResult result = new IJsonResult();

        if (!String.IsNullOrEmpty(AuthCode))
        {
            AuthCode = EncryptHelper.MD5Upper32(AuthCode.ToLower() + Utils.GetIp());
            if (AuthCode != CookieHelper.GetValue("AuthCode"))
            {
                result.Text = "验证码输入错误!";
            }
            else if (!String.IsNullOrEmpty(UserName) && !String.IsNullOrEmpty(UserPass))
            {
                result.Text = "用户名或密码输入错误!";
                Admin.LoginUser(UserName, UserPass, ref result);
            }
        }
        String json = JsonConvert.SerializeObject(result);

        Response.Write(json);
    }