All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
ASP.NET2.0下含有CheckBox的GridView删除选定记录实例_[Asp.Net教程]
ASP与ASP.NET互通COOKIES的一点经验_[Asp.Net教程]
网页Flash播放代码的一个小技巧_JavaScript技术_编程技术
Asp.net,Ajax-我可以用javascript做些什么?_[Asp.Net教程]
如何使用SQL Server数据库查询累计值_[SQL Server教程]
SQL,通配符_mssql学习_编程技术
技术畅谈:开发大型PHP项目的技巧与方法_php资料_编程技术
WML学习(四):锚和任务_[XML教程]
PHP技巧:PHP脚本中关于拼写检查函数库_[PHP教程]
PHPUnit袖珍指南之命令行测试工具_php资料_编程技术
Reading number is top 10 pictures
中国的十元人民币的秘密
Sora aoi on twitter4
身材野火台灣美女1
穷哥们向美女求婚攻略
一个武林高手的故事
再发两张抽象画
Fierce chengdu woman, street rape man
Exquisite decoration is not paying too much2
China's first snake village3
中国女孩大胆自拍,显露完美身材
Download software ranking
Sora aoi, the maid, students' uniforms
Eclipse 4.2.2 For Win64
网络管理员第三版
Tram sex maniac 2 (H) rar bag3
Be there or be square
WebService在.NET中的实战应用教学视频 → 第3集
Tram sex maniac 2 (H) rar bag15
Eclipse 4.2.1 For Win32
天龙八部最新服务端
Proficient in JavaScript
aaa published in(发表于) 2013/12/15 8:52:09 Edit(编辑)
关于生成验证码的源码以及问题解决_.net资料_编程技术

关于生成验证码的源码以及问题解决_.net资料_编程技术

关于生成验证码的源码以及问题解决_.net资料_编程技术-你的首页-uuhomepage.com







在网上找了一个验证码的源代码,使用后出现如下问题:不管你输入正确与否,都会提示验证码错误。后来经过在qq群里和csdn发贴咨询,得知是ie浏览器缓存问题。在经过他人的指点后改正了错误。源代码如下:




-------------------Validate.aspx------------------




<%@ Page Language="C#" %>
<%@ import namespace="System"%>
<%@ import namespace="System.IO"%>
<%@ import namespace="System.Drawing"%>
<%@ import namespace="System.Drawing.Imaging"%>
<%@ import namespace="System.Drawing.Drawing2D"%>







-----------------------register.aspx------------




<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="MyRegister.Register" %>




http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">




http://www.w3.org/1999/xhtml" >

会员注册












































































-------------------------register.aspx.cs-------------------




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.HtmlControls;
namespace MyRegister
{
public partial class Register : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{




}
protected void Button1_Click(object sender, EventArgs e)
{
string checkcode = CheckCode.Text;
//Response.Write(Session["VNum"]);
if (checkcode == Session["VNum"].ToString() || Session["VNum"].ToString()==null)//注意Session["VNum"].ToString(),必须加上ToString(),因//为Session["VNum"]是对象。
Response.Redirect ("default.aspx");
else
Message.Text = "验证码错误或为空!";
}
}
}
---------------------------------




其中注释的地方应特别注意






















添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.