November Happy Hour will be moved to Thursday December 5th.

Using Recaptcha with XForms

Vote:
 

Hi,

I would really appriciate som help with how to make Recpatcha work with XForms.

Where Should i put the Recaptcha code? My guess is that i need to use FormControl_BeforeSubmitPostedData? But how?

The example code for Recaptcha in VB is:

<%@ Page Language="VB" %>  
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>  
 <script runat=server%gt;      
  Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)          
   If Page.IsValid Then              
    lblResult.Text = "You Got It!"              
    lblResult.ForeColor = Drawing.Color.Green          
   Else              
    lblResult.Text = "Incorrect"              
    lblResult.ForeColor = Drawing.Color.Red          
   End If      
  End Sub  
 </script>  

<html>  
<body>      
<form runat="server">          
<asp:Label Visible=false ID="lblResult" runat="server" />          
<recaptcha:RecaptchaControl ID="recaptcha" runat="server" Theme="red" PublicKey="your_public_key" PrivateKey="your_private_key" />           
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />      
</form>  
</body>  
</html>

#46633
Dec 22, 2010 10:19
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.