私はdnn 7.1に取り組んでいます.DNNページにGoogleキャッチャーを追加しました. このサイトからの参照を参照してください
この参照の助けを借りて、dnn ページにキャプチャを追加しました。しかし、キャプチャ検証では機能しません。テキストボックスに何か書いてください。エラーメッセージを表示しません。フォーム送信に成功しました。検証のために何ができるか教えてください。コードを以下に示します
<%--<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>--%>
<%@ Control Language="C#" ClassName="Admin.ContactUs" Inherits="DotNetNuke.Entities.Modules.PortalModuleBase" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="System.Data" %>
<script runat="server">
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
SendMailTest();
}
else
{
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
</script>
<div class="contactusform-left commonclass lF">
<asp:Label ID="lblmsg" runat="server" Text=""></asp:Label>
/* Code for textbox, dropdowm */
</div>
<div class="contactusform-right commonclass lF">
<div class="contactusform-set-textarea contactusform-set" style="height:150px;">
<label class="lF">
Captcha <span>*</span></label>
<div style="clear:left;width:100%;height:100px;">
<recaptcha:RecaptchaControl ID="recaptcha" runat="server" PublicKey="6LdCxeYSAAAAAAP-uIGWnsZHeW7rn8rzeeblc5g"
PrivateKey="6LdCxeYSAAAAAFvnxCiaN_7vkHp-vaVRRYb9yVF" />
<asp:Label Visible=false ID="lblResult" runat="server" />
</div>
</div>
<div style="clear:both;"></div>
<div class="contactusform-set " style="margin-top:10px;">
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click"
ValidationGroup="ContactUsValidate" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel" Style="color: #8D8D8D; cursor: pointer;
float: right; font-weight: bold; height: 34px; margin-right: 5px; text-transform: uppercase;
width: 120px;" />
</div>
</div>