Example #1
0
    protected void Page_Load(object sender, EventArgs e) {

      VerifyCode verifyCode = null;
      string code = string.Empty;

      verifyCode = new VerifyCode();
      verifyCode.FontSize = 14;
      code = verifyCode.CreateVerifyCode();
      verifyCode.CreateImageOnPage(code, this.Context);

      Response.Cookies.Add(new HttpCookie("CheckCode", code.ToUpper()));
    }
    public void ProcessRequest(HttpContext ctx) {

      VerifyCode verifyCode = null;
      string code = string.Empty;

      verifyCode = new VerifyCode();
      verifyCode.FontSize = 14;
      code = verifyCode.CreateVerifyCode();
      verifyCode.CreateImageOnPage(code, ctx);

      ctx.Response.Cookies.Add(new HttpCookie("CheckCode", code.ToUpper()));
    }