protected void Page_Load(object sender, System.EventArgs e) { VaildImg v = new VaildImg(); //长度 v.Length = this.length; //字体大小 v.FontSize = this.fontSize; v.Chaos = this.chaos; v.BackgroundColor = this.backgroundColor; v.ChaosColor = this.chaosColor; v.CodeSerial = this.codeSerial; v.Colors = this.colors; v.Fonts = this.fonts; v.Padding = this.padding; //取 string code = v.CreateVerifyCode(); //取随机码 v.CreateImageOnPage(code, this.Context); // 输出图片 Session["VaildCode"] = code.ToUpper(); // 使用Cookies取验证码的值 Response.End(); }
protected void Page_Load(object sender, System.EventArgs e) { VaildImg v = new VaildImg(); //长度 v.Length = this.length; //字体大小 v.FontSize = this.fontSize; v.Chaos = this.chaos; v.BackgroundColor = this.backgroundColor; v.ChaosColor = this.chaosColor; v.CodeSerial = this.codeSerial; v.Colors = this.colors; v.Fonts = this.fonts; v.Padding = this.padding; //取 string code = v.CreateVerifyCode(); //取随机码 v.CreateImageOnPage(code, this.Context); // 输出图片 Session["VaildCode"] = code.ToUpper();// 使用Cookies取验证码的值 Response.End(); }