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 OriginalGriff 250
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 DamithSL 125
4 Afzaal Ahmad Zeeshan 120
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 30 Sep 2011
Copyright © CodeProject, 1999-2014
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