Bin文件夹包含
MSCaptcha.dll
MSCaptcha.xml
html页面包含
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="captcha.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="CaptchaImage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<CaptchaImage:CaptchaControl ID="CaptchaControl2" runat="server" />
</div>
</form>
</body>
</html>
网络配置
<httpHandlers>
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
</httpHandlers>
我完成了所有的事情,如
所示http://www.msdotnet.co.in/2012/08/how-to-add-captcha-image-in-aspnet.html
并且它在本地主机上正常运行但在线上它显示的是Captcha文本而不是图像。 我该怎么办
答案 0 :(得分:0)
尝试此链接:
Mitesh Jain
此链接对您有用... 我认为它会起作用。
http://www.programminghelp.com/asp-net/how-to-add-simple-captcha-in-c-part-one/
http://www.aspsnippets.com/Articles/How-to-implement-Captcha-in-ASP.Net.aspx
答案 1 :(得分:0)
我用过
Google Captcha : http://www.google.com/recaptcha/captcha
哪个将在任何网络服务器上运行