Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
Can somebody please assist me, i am building a personal asp.net web application
in C# and i want to include a Captcha.I have decided to use a number sequence, as in "2,4,_,8". The user must fill in the missing value. Also, the placeholder must change on each attempt. I also want the Captcha to monitor unsuccessful IP(i.e Flag them). Thanks in advance
Posted 29-Sep-11 7:47am
Edited 29-Sep-11 8:26am
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

there is already a ASP.NET server control for this called MScaptcha. its a free control. You can download its dll from the following site
 
http://www.mondor.org/captcha.aspx[^]
 

You will get proper documentation, regarding how to use it.
 
Still for youe help, belowgiven are brief steps how to implement it.
 
Download the dll and add its refrence to your project and then do the following.
 
//Web.config
 
      <httpHandlers>
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
 
            </httpHandlers>
 

//In  Aspx page or in user control
 
<%@ Register Assembly="MSCaptcha"Namespace="MSCaptcha" TagPrefix="cc1" %>
 
<cc1:CaptchaControl ID="ccJoin" runat="server" CaptchaBackgroundNoise="none" CaptchaLength="5" CaptchaHeight="60" CaptchaWidth="200" CaptchaLineNoise="None" CaptchaMinTimeout="5" CaptchaMaxTimeout="240" />
 

///C# Code
 
Button click event
 
  ccJoin.ValidateCaptcha(txtcaptchatext.Text.Trim());
 
  if (ccJoin.UserValidated)
        {
//submit form
  }
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 424
1 OriginalGriff 375
2 CHill60 230
3 CPallini 220
4 Maciej Los 210
0 Sascha Lefévre 75
1 OriginalGriff 70
2 F-ES Sitecore 55
3 Peter Leow 50
4 Dave Kreskowiak 40


Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 30 Sep 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100