.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh

Home >> Articles >> ASP.NET >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Captcha Generation

Posted By:Gowthammanju       Posted Date: June 04, 2011    Points: 25    Category: ASP.NET    URL: http://www.dotnetspark.com  

This article generates captcha for the process of user authentication.


   Now we are going to read how to generate the captcha files in to our project

follow the below steps:

1)Right click the solution explorer and select add reference tab in it.

2)Then click the browse tab and select the captcha.dll in to it.

3)Now right click the tool bar and add choose items in it.

4)Browse for the captcha.dll and finally click ok.




5)Add the captcha control in to form of your project

6)Now insert

a) Text box

b) Button

c) Label

  in to your aspx page

7)Copy and paste the following codings in the click event of button 

 protected void Button1_Click(object sender, EventArgs e)

CaptchaControl1.ValidateCaptcha(TextBox1.Text); if (!CaptchaControl1.UserValidated) { Label1.Text = "You Entered Text Doesn't Match"; return; } else { Label1.Text = "Successfully Entered"; }

8)Modify your Web.config page as below


these are those:

9)finally run your project you will get output as


If you did not got the solution kindly download the attachment below


Thanks & Regards, 
Eternal Softwares

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend