BotDetect ASP.NET CAPTCHA Web UI API Reference (BotDetect v3.0; deprecated)
The BotDetect.Web.UI namespace contains BotDetect ASP.NET Captcha controls used within ASP.NET Web Forms applications (equivalent to System.Web.UI).
BotDetect.Web.UI.Captcha
The ASP.NET Custom Web Control used to add Captcha protection to ASP.NET Web Forms applications.
Inherits
System.Web.UI.WebControls.WebControl
BotDetect.Web.UI.Captcha Class Reference | ||
---|---|---|
bool Validate
|
Validates the Captcha, comparing the user input to the Captcha code stored on the server. Each randomly generated Captcha code can only be validated once, regardless of the validation result | |
string UserInputClientID | User input textbox client-side identifier (the ASP.NET ClientID property), used for all client-side user input processing, e.g. automatic user input lowercasing and focusing | |
string Locale | Locale string, affects the character set used for Captcha code generation and the pronunciation language used for Captcha sound generation | |
int CodeLength | Length (number of characters) of the Captcha code rendered; the default value is 5 | |
BotDetect.CodeStyle CodeStyle | Code style, i.e. the algorithm used to generate Captcha codes; the default value is Alphanumeric | |
string CustomCharacterSetName | Optional name of the user-defined character set used for Captcha code generation. A collection of custom character sets can be defined in the <botDetect> section of the web.config file | |
BotDetect.ImageStyle ImageStyle | Image style, i.e. the algorithm used to render Captcha codes in images; if no image style is set, it is randomized by default | |
System.Drawing.Size ImageSize | Size of the Captcha image rendered; the default size is (250, 50) | |
BotDetect.ImageFormat ImageFormat | Image format in which the Captcha image will be rendered; the default format is JPEG | |
System.Drawing.Color CustomDarkColor | Optional custom dark color point, modifies the color palette used for Captcha image drawing | |
System.Drawing.Color CustomLightColor | Optional custom light color point, modifies the color palette used for Captcha image drawing | |
BotDetect.SoundStyle SoundStyle | Sound style, i.e. the algorithm used to pronounce Captcha codes in sounds; if no sound style is set, it is randomized by default | |
BotDetect.SoundFormat SoundFormat | Audio format in which the Captcha sound will be generated; the default format is WawPcm16bit8kHzMono | |
BotDetect.SoundRegenerationMode SoundRegenerationMode | Sound regeneration mode determining how will multiple consecutive requests for audio Captcha with the same Captcha code be handled by BotDetect; the default mode is |
|
string CaptchaImageTooltip | The Captcha image tooltip can be set for the entire application using web.config settings; this instance property allows overriding those values dynamically. | |
string ReloadIconTooltip | The Captcha reload icon tooltip can be set for the entire application using web.config settings; this instance property allows overriding those values dynamically. | |
string SoundIconTooltip | The Captcha sound icon tooltip can be set for the entire application using web.config settings; this instance property allows overriding those values dynamically. | |
bool UseHorizontalIcons | By default, tells is the selected Captcha image height so low that we should switch to horizontal icon rendering; can be user-specified to always (or never) switch to the horizontal icon layout | |
bool UseSmallIcons | By default, tells is the selected Captcha image height so low that we should switch to smaller icons; can be user-specified to always (or never) use small icons | |
int IconsDivWidth | Calculated width of the Captcha icons <div>, can be user-set to create custom icon layouts | |
short TabIndex | Starting tabindex for the Captcha control Html output. The keyboard-selectable Captcha markup elements are: the Captcha reload icon, the Captcha sound icon, and (only in the Free version of BotDetect) the BotDetect website link. Depending on your settings (is Captcha reloading enabled, are Captcha sounds enabled) and the version of BotDetect you are using (free or paid), the next available tabindex on the page can be from 0 to 3 greater than this value. |
|
readonly string CaptchaId | Unique identifier of the Captcha control within the application (for example, if you placed one Captcha control on the Registration page and another on the Contact Us, they would have distinct CaptchaId values) | |
readonly BotDetect. Web.CaptchaControl CaptchaControl | Underlying CaptchaControl instance | |
EventHandler <InitializedCaptchaControl EventArgs> InitializedCaptchaControl | Custom event handler delegate for InitializedCaptchaControl events, most commonly used for Captcha property randomization | |
EventHandler <GeneratingCaptchaCode EventArgs> GeneratingCaptchaCode | Custom event handler delegate for GeneratingCaptchaCode events, which occur before each Captcha code is generated | |
EventHandler <GeneratedCaptchaCode EventArgs> GeneratedCaptchaCode | Custom event handler delegate for GeneratedCaptchaCode events, which occur after each Captcha code has been generated | |
EventHandler <GeneratingCaptchaImage EventArgs> GeneratingCaptchaImage | Custom event handler delegate for GeneratingCaptchaImage events, which occur before each Captcha image is generated | |
EventHandler <GeneratedCaptchaImage EventArgs> GeneratedCaptchaImage | Custom event handler delegate for GeneratedCaptchaImage events, which occur after each Captcha image has been generated | |
EventHandler <GeneratingCaptchaSound EventArgs> GeneratingCaptchaSound | Custom event handler delegate for GeneratingCaptchaSound events, which occur before each Captcha sound is generated | |
EventHandler <GeneratedCaptchaSound EventArgs> GeneratedCaptchaSound | Custom event handler delegate for GeneratedCaptchaSound events, which occur after each Captcha sound has been generated | |
EventHandler <ValidatingUserInput EventArgs> ValidatingUserInput | Custom event handler delegate for ValidatingUserInput events, which occur before each user input is generated | |
EventHandler <ValidatedUserInput EventArgs> ValidatedUserInput | Custom event handler delegate for ValidatedUserInput events, which occur after each user input has been generated | |
static System.Collections. Generic.List<string> BannedSequences | Optional global list of sequences which will be filtered out of the randomly generated Captcha codes, used for example for swear-word filtering |
BotDetect.Web.UI.CaptchaValidator
An ASP.NET Validator used to integrate Captcha validation with other field validators and validation summaries. Requires a Captcha control instance and a text input field.
Inherits
System.Web.UI.WebControls.BaseValidator
BotDetect.Web.UI.CaptchaValidator Class Reference | ||
---|---|---|
void Validate | BaseValidator override, performs server-side Captcha validation and updates the IsValid status | |
string CaptchaControl | ASP.NET ID of the Captcha control the validator validates | |
string ControlToValidate | ASP.NET ID of the TextBox or other text input control the validator validates | |
string ErrorMessage | Inherited from BaseValidator, the error message shown when Captcha validation fails | |
bool EnableClientScript | Inherited from BaseValidator, should client-side validation be enabled; note that the control only validates the user input is not empty on the client side, and performs actual Captcha validation on the server (i.e. Ajax Captcha validation is not implemented in this validator class) | |
bool SetFocusOnError | Inherited from BaseValidator, should the user input field be focused when Captcha validation fails | |
bool IsValid | Inherited from BaseValidator, has the Captcha validation been successfully passed |
Please Note
The information on this page is out of date and applies to a deprecated version of BotDetect™ CAPTCHA (v3.0).
An up-to-date equivalent page for the latest BotDetect Captcha release (v4) is BotDetect v4 Captcha documentation index.
General information about the major improvements in the current BotDetect release can be found at the What's New in BotDetect v4.0 page.
Current BotDetect Versions
-
BotDetect ASP.NET CAPTCHA
2019-07-22v4.4.2 -
BotDetect Java CAPTCHA
2019-07-22v4.0.Beta3.7 -
BotDetect PHP CAPTCHA
2019-07-22v4.2.5