Fast, Flexible & Easy
Menulab home > FlexCaptcha >  Documentation 

FlexCaptcha Logo FlexCaptcha Documentation

Member Description
Image Mode
public enum mlImageMode Menulab.FlexCaptcha.ImageModeEnum {get;set;} Default is WriteToDisk. To avoid writing captcha images to disk, you can instead write captcha images directly to http stream - to do that you will need to do the following :
  1. Set mlImageMode to WriteToHttpStream :
    protected void Page_Load(object sender, EventArgs e)
    	mlFlexCaptcha.mlImageMode = Menulab.FlexCaptcha.ImageModeEnum.WriteToHttpStream;
  2. Add an http handler to the web.config file :
            <add name="FlexCaptcha" verb="GET" path="FlexCaptcha.axd" type="Menulab.CaptchaImageHandler, Menulab.FlexCaptcha"/>
public property mlCaptchaImageFolderUrl string {get;set;} Default is _menulab/FlexCaptcha - note that this value will be prefixed with Request.ApplicationPath. This setting is only relevant for mlImageMode = Menulab.FlexCaptcha.ImageModeEnum.WriteToDisk (default).
public method mlValidate() boolean. Compares the user input of the default builtin inputbox with the captcha. If the user input and the captcha are the same (taking mlLetterCaseIgnore into account), mlValidate() will return true.
public method mlValidate(string userInput) boolean. If you set mlIncludeInputBox = false you are responsible for supplying your own user input box and transfer the user input to the validate function.
Controls to show
public property mlIncludeUserInputBox boolean {get;set;} Default is true.
public property mlIncludeReloadButton boolean {get;set;} Default is true.
Character Settings
public property mlLetterCount integer {get;set;} Default is 3.
public property mlLetterCaseIgnore boolean {get;set;} Default is true.
public enum mlLetterSet Menulab.FlexCaptcha.LetterSetEnum {get;set;} Default is EasyRecognizable.
public property mlLetterSetCustom string {get;set;} Default is null.
Font Settings
public enum mlFontFamily System.Drawing.FontFamily {get;set;} Default is GenericSansSerif.
public property mlFontSize integer {get;set;} Default is 24.
public enum mlFontStyle System.Drawing.FontStyle {get;set;} Default is Bold.
Brush Settings
public enum mlLetterBrush.mlStyle System.Drawing.Drawing2D.HatchStyle {get;set;} Default is LargeConfetti.
public enum mlLetterBrush.mlForeColor System.Drawing.Color {get;set;} Default is DarkGray.
public enum mlLetterBrush.mlBackColor System.Drawing.Color {get;set;} Default is LightGray.
public enum mlBackgroundBrush.mlStyle System.Drawing.Drawing2D.HatchStyle {get;set;} Default is LargeGrid.
public enum mlBackgroundBrush.mlForeColor System.Drawing.Color {get;set;} Default is DarkGray.
public enum mlBackgroundBrush.mlBackColor System.Drawing.Color {get;set;} Default is White.
public enum mlNoiseBrush.mlStyle System.Drawing.Drawing2D.HatchStyle {get;set;} Default is SmallCheckerBoard.
public enum mlNoiseBrush.mlForeColor System.Drawing.Color {get;set;} Default is DarkGray.
public enum mlNoiseBrush.mlBackColor System.Drawing.Color {get;set;} Default is LightGray.
public property mlCssClasses.UserInput string {get;set;} Default is mlFlexCaptcha.mlCssClasses.UserInput which is a builtin string. To set you own class, you just define a class, eg. myOwnInputBoxCss, and set it : mlFlexCaptcha.mlCssClasses.UserInput = "myOwnInputBoxCss"; (you will loose automatic correct height of user input textbox and reload image).
public property mlNoiseLevel integer {get;set;} Default is 40.
public property mlFixedWidth boolean {get;set;} Default is false.
public property mlPasswordToEncryptCaptchaCode string {get;set;} Default is this.GetType().AssemblyQualifiedName. The captcha code (matching the captcha image) is sent to the browser in ViewState and then retrieved again upon PostBack to be compared with the user input. To avoid a hacker reading the ViewState to get the captca code, the captcha code is encrypted.

Terms & Conditions    |    Privacy Policy    |    Sitemap    |    Copyright © Menulab 2012. All rights reserved.