This is a simple captcha control. It just creates a random number and shows it as image. You can play around to rotate it, give more effects to make it “only human” understandable. Personally I don’t have much problems with spammers so I use the simplest format as below, I will publish a recent updated version of this article alsoHere are the steps to establish the simplest Captcha, this one works as an img tag and it’s source set to an Web form, you can make this a control easily1) First create an image tag in the webform that has the submit form.As you see, the source for the picture will be a file called “Turing.aspx”.2) Later, create the webform “Turing.aspx” with the code below:public class Turing1: System.Web.UI.Page{private void Page_Load(object sender, System.EventArgs e){Bitmap objBMP =new System.Drawing.Bitmap(60,20);Graphics objGraphics = System.Drawing.Graphics.FromImage(objBMP);objGraphics.Clear(Color.Green);objGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;//’ Configure font to use for textFont objFont = new Font(“Arial”, 8, FontStyle.Bold);string randomStr=””;int[] myIntArray = new int[5];int x;//That is to create the random # and add it to our stringRandom autoRand = new Random();for (x=0;x
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.
Related Posts
- Achieve Faster and More Controlled Management of MySQL Databases with Updated dbForge Studio for MySQL
- Tambov Bakery’s Revolutionary Dual-Purpose Facility
- Setting Up an eSIM on Your iPhone
- Geopolitical conflicts threaten Pacific peace, Waqa warns
- Walmart’s sales soar amid pandemic, eyes further expansion























