I have an application which is completely based on ASP.NET I have decided to arranged Captcha on that application but for that I wanted to develop that Captcha for my application and I also wanted to have the result of that Captcha in .NET only
I have an application which is completely based on ASP.NET I have decided to arranged Captcha on that application but for that I wanted to develop that Captcha for my application and I also wanted to have the result of that Captcha in .NET only
VB.Net using Visual Studio 2005. Before we jump into the code lets take a look at what a CAPTCHA is. , Net using Visual Studio 2005. Before we jump into the code lets take a look at what a CAPTCHA is. The BotDetect ASP.NET CAPTCHA validation sample contains the basic code required to add a CAPTCHA control to an ASP.NET page and validate the user input. It can be used as a starting point when you are first learning how to use BotDetect CAPTCHA.
CAPTCHA stands for Completely Automated Public Turing Test To Tell Computers And Humans Apart." What does this mean? It is a program that can tell humans from machines using some type of generated test.
This handler defines a special page named CaptchaImage.aspx. Now, this "page" doesn't actually exist.Code:<httpHandlers> <add verb="GET" path="CaptchaImage.aspx" type="WebControlCaptcha.CaptchaImageHandler, WebControlCaptcha" /> </httpHandlers>
The form also contains an <asp:TextBox> for the user input, an <asp:Button> to submit the page, and a pair of <asp:Label> controls which are used to show the CAPTCHA validation result. There has to be communication between the HttpHandler responsible for displaying the image, and the web page hosting the control -- otherwise, how would the calling control know what the randomly generated CAPTCHA. Using the class is simple. You just create the class, display the graphic from it and verify user input against the value stored in the class. You can also regenerate the value if the user requests it. Remember that you will need to save the generated bitmap to disk in order to display it to a web user in an ASP.NET application.
Bookmarks