ASP.NET CAPTCHA: Lanap.BotDetect.Captcha Class

This class is an ASP.NET Custom Web Control that creates and validates image and sound CAPTCHAs.

Public Instance Constructors

Lanap.BotDetect.Captcha public instance constructor Captcha() Initialize a new instance of the Lanap.BotDetect.Captcha class.

Public Instance Properties

Lanap.BotDetect.Captcha public instance property CaptchaImageAltText Custom alt text of the CAPTCHA image. The default alt text used is "CAPTCHA code image".
Lanap.BotDetect.Captcha public instance property CodeLength Length (number of characters) of the random code used for CAPTCHA generation. The default length is 5 characters.
Lanap.BotDetect.Captcha public instance property CodeType The type of random code used for CAPTCHA generation. Valid values are members of the CodeTypeEnum Enumeration. The default value is CodeTypeEnum.AlphaNumeric.
Lanap.BotDetect.Captcha public instance property ImageEnabled A flag indicating should the CAPTCHA image be rendered. True by deafult.
Lanap.BotDetect.Captcha public instance property ImageFormat The image format in which CAPTCHA images will be rendered. Valid values are members of the ImageFormatEnum Enumeration. The default value is ImageFormatEnum.Jpeg.
Lanap.BotDetect.Captcha public instance property ImageSize Size of the CAPTCHA image rendered (in pixels). The default value is (250, 50).
Lanap.BotDetect.Captcha public instance property ReloadEnabled A flag indicating should the image reload button be rendered with the control. True by deafult.
Lanap.BotDetect.Captcha public instance property ReloadIconAltText Custom alt text of the CAPTCHA reload icon. The default alt text used is "Change the code".
Lanap.BotDetect.Captcha public instance property SoundEnabled A flag indicating should the link to the audio CAPTCHA be rendered with the control. True by deafult.
Lanap.BotDetect.Captcha public instance property SoundIconAltText Custom alt text of the CAPTCHA sound icon. The default alt text used is "Speak the code".
Lanap.BotDetect.Captcha public instance property TextStyle The text style (distortion algorithm) used for CAPTCHA image generation. Valid values are members of the TextStyleEnum Enumeration. The default value is TextStyleEnum.Chalkboard.

Public Instance Methods

Lanap.BotDetect.Captcha public instance method Validate(string code) Compares the code sent by argument with the code used to generate the CAPTCHA instance that is being validated.

Public Static Methods

Lanap.BotDetect.Captcha public instance method Validate(string code, string captchaID, string instanceID) A static variant of the Validate method, allowing easier integration with various Ajax and MVC frameworks.
letter
about