Rikk / recaptcha

Automatically exported from code.google.com/p/recaptcha
0 stars 0 forks source link

Errors creating RecaptchaControl.cs #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.

I copied and pasted the code from here: 
http://code.google.com/p/recaptcha/source/browse/trunk/recaptcha-
plugins/dotnet/library/RecaptchaControl.cs?r=111&spec=svn111 to a class in 
my .Net C# project.  

Can I use this code instead of using the DLL and referencing it in my 
project?  Not adding the reference to my project gives me this error: "The 
type or namespace name 'RecaptchaResponse' could not be found (are you 
missing a using directive or an assembly reference?)"

When I add the references to the Recaptcha DLL and build the solution I 
receive this error: "The type 'System.Web.UI.Design.ControlDesigner' is 
defined in an assembly that is not referenced."  

It says the error is here: "public class RecaptchaControl : WebControl, 
IValidator"

I have added a reference to System.Design in my project.  

Can someone help me with using the recaptcha control in my project?  I 
cannot seem to get passed the errors.  

Basically, I want to use the actual code and not the dll because I am using 
the ValidationSummary control in my page and that causes me to receive "The 
verification words are incorrect" on page load.  I would like to implement 
this fix: 
http://groups.google.com/group/recaptcha/browse_thread/thread/953ba28e053fb
44a

This is how I am referencing the recaptcha code on my webpage:

As a page directive:
<%@ Register Src="~/ClassFolder/RecaptchaControl.cs" TagPrefix="recaptcha" 
TagName="RecaptchaControl" %>

And this below as a control:
<recaptcha:RecaptchaControl ID="recaptcha" runat="server" PublicKey="***" 
PrivateKey="***" />

Original issue reported on code.google.com by bulletin...@gmail.com on 3 May 2009 at 7:52

GoogleCodeExporter commented 9 years ago
Not reCAPTCHA issue.

Original comment by adrian.g...@gmail.com on 24 May 2010 at 9:04