Click here to Skip to main content
15,891,204 members
Articles / Web Development / ASP.NET

A CAPTCHA Control for ASP.NET 2

Rate me:
Please Sign up or sign in to vote.
4.86/5 (55 votes)
14 Mar 2008LGPL35 min read 359.3K   5.6K   174  
A CAPTCHA control that is simple, secure, and easy to use.
using System;

namespace SecureCaptcha.Security.Cryptography
{
    /// <summary>
    /// Provides methods for generating random texts.
    /// </summary>
    public static class RandomText
    {
        /// <summary>
        /// Generates an 8 letter random text.
        /// </summary>
        public static string Generate()
        {
            // Generate random text
            string s;
            Guid guid = Guid.NewGuid();

            s = guid.ToString().Substring(3, 4);

            return s;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Australia Australia
I'm a Computer Science student at Monash University, Australia.

See my blog at http://blog.farshidzavareh.com

Comments and Discussions