How to add captcha to web form in asp.net .

The Capcha is stand for "Completely Automated Public Turing test to tell Computers and Humans Apart". The basic use of Capcha is to safe his/her site from automated programs that are made for different wrong purposes like entering unuseful data to any site so that his site goes down.

But solution to above problem is Capcha that provide scurity to us from these type of programs. 




In this Post , You will learn..

    1)  How To add Capcha  Control to Toolbox.
    2)  How to add Capcha Control to Web Form.


Learn  How To add Capcha  Control to Toolbox.

1)  First step of making site secure form programs is: Download the capcha from the below link.


                Download link
                Capcha Version 4.0 for .net framework 4

2)  After Downloading, you need to extract it .

3) Now open the Visual studio. and Then Open the Website or Webform in which you want to add capcha Control.


4) Now Open the ToolBox ( shortcut key :-  Ctrl+W,

5)  Add A new Tab by right clicking on toolbox ( Give it a name "Capcha Control" or whatever)
 



6) Now Select this tab, and select Choose Items.

then a new window will open , Now Browse  " MSCaptcha.dll " file in The Downloaded Capcha Control Folder.

and select it.and click ok.


Now you have added the capcha control to the toolbox.



Learn How to add it to the Web Form.



1) Copy or  Drag The Capcha From ToolboxTo Web form (where you want to add the capcha)

2) Add a new Textbox and a Button to the same form.


3) Now Double click on the button to go to the coding page.

4) now do the following coding under Button.

CaptchaControl1.ValidateCaptcha(TextBox1.Text);
        if (CaptchaControl1.UserValidated)
{
        Response.Redirect("demo.aspx");
            
}
        Response.Write("wrong input");


Now Play it. You are Done here !


Download Source or Project of capcha control.

Click Here


Notice : Now Please click on the below or right hand side Adds (image or text).








1 comments :

I really appreciate sharing this great post. I like this blog and have bookmarked it. Thumbs up

Decision Making Process

Reply

Post a Comment