<summary> Spelunking Microsoft Technologies - Win32, .NET and Rotor </summary>
using WinToolZone;

Skip Navigation Links
Home
Latest
.NET
Rotor
Windows
[Web] Services
Publications
PresentationsExpand Presentations
Spoken At...
My...Expand My...
GuestbookExpand Guestbook
Feedback

You are visitor  counter

















CaptchaGenerator service exposes two methods from the WZNECaptchaGenerator class:
  •  public string GenerateCode(string Username, string Password, int Length, bool Alphanumeric)

    This method should be invoked first. It will take your www.wintoolzone.com login credentials alongwith the length of the code to be generated and whether it should be alphannumeric code or not. Length can be upto 50 characters.

  • public byte[] GenerateSpamCheckImageFromCode(string Username, string Password, string SpamCheckCode, string ForegroundColor, string BackgroundColor, bool Bold, bool Italic, string FontName)

    The generated code by GenerateCode should be passed as an argument to this method, along with your login credentials and the various font parameters. The return value is a byte array that will contain the image in the .GIF format.

To use the CAPTCHA image generated in your web application, do as follows:

  1. Create a GetCaptchaImage.ASPX page that instantiates WZNECaptchaGenerator and uses the service methods as explained above in the Page_Load event. Once you have got the byte array from the GenerateSpamCheckImageFromCode method, add the following statements:

    Response.ContentType = "image/GIF";
    Response.OutputStream.Write(arrImage, 0, arrImage.Length);

  2. Next, on the page containing your HTML form, put an image control and set it's URL/SRC to the address of GetCaptchaImage.ASPX.