0

我有一个验证码控件,在编写代码并检查它时,如果我正确编写它总是错误的,然后形成第二次它可以正常工作。那可能是验证码的问题

<td id="Td6" runat="server" align="center" class="style4">
    <MSCapatchaControl:CaptchaControl ID="Capatcha" 
                                      runat="server" 
                                      BackColor="#CC3300" 
                                      CaptchaBackgroundNoise="Extreme" 
                                      CaptchaChars="ACDEFGHJKLNPQRTUVXYZ2346789" 
                                      CaptchaHeight="40" 
                                      CaptchaMaxTimeout="240" 
                                      CaptchaMinTimeout="5" 
                                      CaptchaWidth="130" 
                                      FontColor="White" 
                                      ForeColor="White" 
                                      LineColor="Black" 
                                      NoiseColor="Black" />
</td>
<td id="Td7" runat="server" colspan="3">
    <asp:TextBox ID="registerCaptchText" 
                 runat="server" MaxLength="6" Width="135px">
    </asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                                runat="server" 
                                ControlToValidate="registerCaptchText"  
                                Display="None" 
                                ErrorMessage="Enter the capatcha">
    </asp:RequiredFieldValidator>
    <font style="font-size:12px; font-family:trebuchet; color: rgb(51, 51, 51);">
        <div class="important">*</div>
        Please enter the text you see in the image. 
    </font>
</td>

那就是功能测试它

Capatcha.ValidateCaptcha(registerCaptchText.Text);
            bool capatchaValid = Capatcha.UserValidated;
4

1 回答 1

0

嗨,我已经通过在更新面板中获取验证码字段解决了这个问题。感谢每一位宝贵的时间。

于 2013-01-22T16:21:19.360 回答