Thursday, June25, 2009
Asp.Net CAPTCHA and Asp.Net AJAX CAPTCHA
In Asp.Net forums and in many other user communities I have seen lot of people asking for VB.Net CAPTCHA. So I thought to write a blog post and create some sample implementations. The zip file contains C# CAPTCHA and VB.Net CAPTCHA. I have included the samples for Asp.Net AJAX CAPTCHA also.
You can download the samples and implementation from here
Implementing Asp.Net AJAX CAPTCHA is really simple. Just wrap the main Asp.Net CAPTCHA with Asp.Net AJAX update panel and put a random query string at the end of CAPTCHA image src. The random query string will avoid showing the old CAPTCHA from browser cache.
STEPS TO ADD ASP.NET CAPTCHA IN YOUR WEBSITE
- Refer the assembly CaptchaDLL.dll in your project
- Copy JpegImage_CS.aspx or JpegImage_VB.aspx (according to the language of choice) to your website.
- Open the above file and make changes in Colors and Font if needed. (read the inline comments to know more)
- Now user the sample codes from Default.aspx or Ajax.aspx pages. The code is straight forward. You make a session and generate an image with the string in the Session. Now when you submit you have to check the session value and textbox value to see whether the entered CAPTCHA is correct.
If you have any questions please put as a comment.
Tags
Asp.Net CAPTCHA, CAPTCHA, VB.Net CAPTCHA, C# CAPTCHA, ASP CAPTCHA, C sharp captcha, vb captcha, simple captcha, AJAX CAPTCHA, asp.net ajax captcha, captcha without refresh, captcha using ajax, numeric captcha

No comments:
Post a Comment