1

我在 ASP.NET 3.5 应用程序中使用 recaptcha,由于某些奇怪的原因,ErrorMessage 属性不起作用。下面是我的代码

 <recaptcha:RecaptchaControl ID="recaptcha" runat="server" PublicKey="*******************************" PrivateKey="*******************" Theme="white" ErrorMessage="This is an typo error"  />

当键入的文本与 recaptcha 图像文本不匹配时,它仍会显示默认错误消息“不正确。再试一次”。而不是我的自定义错误消息。这种奇怪行为的原因可能是什么

4

1 回答 1

0

您将消息放在文字标记中。这是我的代码片段:

                                    <tr>
                                        <td align="center" colspan="2" >
                                        <recaptcha:RecaptchaControl Theme="white"  ID="recaptcha" runat="server" PrivateKey="*************"
                                                PublicKey="*************" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="2" style="color: red">
                                            <asp:Literal ID="FailureText" runat="server" EnableViewState="False" Text="You have not entered the verification words correctly. Please try again."></asp:Literal>
                                        </td>
                                    </tr>
  • 麦克风
于 2010-01-28T18:40:43.803 回答