0

我正在编写一个带有 recaptcha 字段的 mvc3 表单。

在我的控制器顶部,我确保有:@using System.Web.Helpers @using Recaptcha

并且 recaptcha 字段在被调用时呈现在视图上,但它与页面是否被认为是有效的没有任何关系。在视图中,我使用 @ReCaptcha.GetHtml(publicKey: "[public removed from this example]") 渲染它

我试图在我的控制器中调用 Recaptcha.Validate,但后来我被告知它在当前上下文中不存在。当我在 Recaptcha 上使用智能感知时,唯一可用的字段是 Design、RecaptchaControl、RecaptchaControlMVC、RecaptchaResponse 和 RecaptchaValidator。为什么我的recaptcha 字段不起作用,为什么根据Visual Studio 不存在验证功能?

4

0 回答 0