本代码是使用C#语言写的asp.net网站验证码.System.IO.MemoryStream ms = new System.IO.MemoryStream(); bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Png); this.Response.ContentType = "image/png";
实现代码
代码如下:/// /// 生成验证码图片,保存session名称VerificationCode /// public static void CreateVerificationCode() { int number; string checkCode = string.Empty;
//随机数种子 Random randoms = new Random();
for (int i