无刷新波形扭曲asp.net验证码
无刷新:也就是一般网站都有的“看不清,点击更换”、“更换验证码”的那种功能,一段js脚本搞定!
波形扭曲:类似google验证码,这个能更有效的防止验证码被机器人攻破,具体的扭曲程度可以自行设置(正弦曲线Wave扭曲图片产生波形滤镜效果),加加参数也可以改成msn的那种啊,自己举一反三吧!
彩色:字符颜色都是随机的
大小写:也是随机的,当然为了输入方便没有对大小写进行限制,也可以自己修改
1、VerifyCode.aspx.cs代码:
protected void Page_Load(object sender, EventArgs e)
{
VerifyCode v = new VerifyCode();
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(); //取随机码
&nb
相关文档:
asp.net(C#)实现SQL2000数据库备份和还原
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.Htm ......
<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
prote ......
Bitmap srcImg = new Bitmap(300, 300); //也可以读入一张图片
Graphics graphics = Graphics.fromImage(srcImg);
Font font = new Font("宋体", 16); //字体与大小
Brush brush = new SolidBrush(Color.Red);
graphics.DrawString("www.cftea.com", font, brush, 50, 50); //写字,最后两个参数表示位置
Pen pen = ne ......
1. config结构
Framework\Config\Machine.config, 为所有config的根,特别只有它才能具有<processMode>节,该节修改后必须重启IIS方能生效,而其它节的改动,只要一保存,就有效了,这是IIS6的一大进步。
以下分别是从上往下的几个家族类(为继承关系,这种设计可以大 ......
1.//弹出对话框.点击转向指定页面
Response.Write("<script>window.alert('该会员没有提交申请,请重新提交!')</script>");
Response.Write("<script>window.location ='http://www.cgy.cn/bizpulic/upmeb.aspx'</script>");
2.//弹出对话框
Response.Write("<scr ......