gpt4 book ai didi

asp.net - 为什么 recaptcha.IsValid 总是返回 True

转载 作者:行者123 更新时间:2023-12-04 05:38:35 24 4
gpt4 key购买 nike

为什么 recaptcha.IsValid 总是返回 True?

    Protected Sub CreateUserWizard1_CreatingUser(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.LoginCancelEventArgs) Handles CreateUserWizard1.CreatingUser
Dim Captcha As RecaptchaControl = CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("recaptcha1"), RecaptchaControl)
If Not Captcha.IsValid Then
e.Cancel = True
End If
End Sub

最佳答案

调用 Captcha.Validate()之前 Captcha.IsValid

    Protected Sub CreateUserWizard1_CreatingUser(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.LoginCancelEventArgs) Handles CreateUserWizard1.CreatingUser
Dim Captcha As RecaptchaControl = CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("recaptcha1"), RecaptchaControl)
Captcha.Validate()
If Not Captcha.IsValid Then
e.Cancel = True
End If
End Sub

关于asp.net - 为什么 recaptcha.IsValid 总是返回 True,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11590269/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com