I am using Google recaptcha in one of our projects. I added the recaptcha control in aspx page. Now i want to validate the value entered in recaptcha that is whether it is correct or not. How can i done it in a button click event? I am using c#.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Carriage Return (ASCII chr 13) is missing from tex
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
Apparently it doesn't work with ASP.NET ValidationGroups. If you have a ValidationGroup, you need to call recaptcha.Validate() manually before checking recaptcha.IsValid or Page.IsValid.
Edit: call
Page.Validate()
before checking conditionIf you're using the ASP.NET reCaptcha control, you need to manually call
before you check the
recaptcha.IsValid
orPage.IsValid
properties.C# must use recaptcha.Validate() depois you can use check if Page.IsValid