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
它在本地主机上运行良好,但在网上显示验证码文本而不是图像。我该怎么办