RadCaptcha
This control serves as spam protection mechanism. It implements 3 strategies:
- Auto-detection - if this strategy is chosen, then we use predefined rules
which decide whether the input comes from a robot or not. This strategy is not 100% secure and some sophisticated robots may pass it so it should be used in personal websites with low traffic and where spam robots are not very likely to drop by. If such robots are found to visit the site, the use of the more secure strategy is more advisable. 2. RadCaptcha - if this strategy is chosen, then an image with obfuscated text is displayed and the user is required to input this text in a textbox thus allowing the control to validate whether s/he is a robot or not. This is the most secure method to protect from spam but it is considered to be inaccessible because disabled people may not see the text in the image! TODO in future release: 3. Subscribe to anti-spam services. This last spam protection mechanism is used to validate the input against public or private web services which given the input return whether or not it is considered to be spam. Some services claim that they catch more than 90% of the spam so this type of protection is fairly secure and can be used in small to medium websites but not in large-scale websites.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[ClientScriptResource("Telerik.Web.UI.RadCaptcha", "Telerik.Web.UI.Captcha.RadCaptcha.js")]
[TelerikToolboxCategory("Miscellaneous")]
[ToolboxBitmap(typeof(RadCaptcha), "Toolbox.Icons.Captcha.png")]
public class RadCaptcha : RadWebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, ISkinnableControl, IControl, IValidator, INamingContainer, IPostBackDataHandler
Inheritance: objectControlWebControlRadWebControlRadCaptcha
Implements:
Inherited Members
Constructors
public RadCaptcha()
Properties
Gets or sets the RadCaptcha text box access key.
public override string AccessKey { get; set; }
The RadCaptcha text box access key.
Overrides:
Gets or sets the access key for the Get Audio Code link.
public string AudioAccessKey { get; set; }
Gets or sets the text of the LinkButton that gets the Captcha Audio Code.
public string CaptchaAudioLinkButtonText { get; set; }
Gets or sets the text of the LinkButton that gets the Captcha Audio Code.
Gets the CaptchaImage object of RadCaptcha
[PersistenceMode(PersistenceMode.InnerProperty)]
public CaptchaImage CaptchaImage { get; }
Gets or sets the text of the LinkButton that generates new CaptchaImage.
public string CaptchaLinkButtonText { get; set; }
Gets or sets the text of the LinkButton that generates new CaptchaImage
Gets or sets the maximum number of minutes RadCaptcha will be cached and valid. If you're too slow, you may be a RadCaptcha hack attempt. Set to zero to disable.
public int CaptchaMaxTimeout { get; set; }
The maximum number of minutes RadCaptcha will be cached and valid. If you're too slow, you may be a RadCaptcha hack attempt. Set to zero to disable.
Gets or sets the CSS class applied to the RadCaptcha input textbox.
[Obsolete("This property is obsolete. Please use the new composite TextBoxDecoration property.")]
public string CaptchaTextBoxCssClass { get; set; }
The CSS class applied to the RadCaptcha input textbox.
Gets or sets the label which explains that the user needs to input the RadCaptcha text box.
public string CaptchaTextBoxLabel { get; set; }
The label which explains that the user needs to input the RadCaptcha text box.
Gets or sets the CSS class to the label which explains that the user needs to input the RadCaptcha text box.
[Obsolete("This property is obsolete. Please use the new composite TextBoxLabelDecoration property.")]
public string CaptchaTextBoxLabelCssClass { get; set; }
The CSS class to the label which explains that the user needs to input the RadCaptcha text box.
Gets or sets the title of the RadCaptcha input textbox.
[Obsolete("This property is obsolete. Please use the new composite TextBoxDecoration property.")]
public string CaptchaTextBoxTitle { get; set; }
The title for the RadCaptcha input textbox.
Gets or sets display behavior of error message.
public ValidatorDisplay Display { get; set; }
Gets or sets the text displayed in the Download Audio Code link.
public string DownloadAudioText { get; set; }
Gets or sets a value indicating whether the Web server control is enabled.
public bool Enabled { get; set; }
Defines whether Download Audio Code link should be rendered.
[ClientControlProperty]
[ClientPropertyName("_enableDownloadAudio")]
public bool EnableDownloadAudio { get; set; }
Gets or sets the value, indicating whether to render the link to the embedded base stylesheet of the control or not. This control features no skins, so this property must be set to false.
[Browsable(false)]
public override bool EnableEmbeddedBaseStylesheet { get; }
Overrides:
Gets or sets the value, indicating whether to render links to the embedded skins or not. This control features no skins, so this property must be set to false.
[Browsable(false)]
public override bool EnableEmbeddedSkins { get; }
Overrides:
Defines whether notification panel for missing audio plug-in should be displayed if one is not installed on the client's machine.
[ClientControlProperty]
[ClientPropertyName("_enableMissingPluginNotification")]
public bool EnableMissingPluginNotification { get; set; }
Gets or sets a bool value indicating whether or not the RadCaptchaImage can be refreshed. The "rcRefreshImage" CSS class should be used for changing the skinning of the LinkButton, that generates the new image.
public bool EnableRefreshImage { get; set; }
Gets or sets a bool value indicating whether or not the RadCaptchaImage can be refreshed.
The error message text generated when the condition being validated fails.
[Bindable(true)]
public string ErrorMessage { get; set; }
Implements:
Gets or sets the fore color of the error message.
public override Color ForeColor { get; set; }
Overrides:
Specifies the URL of the HTTPHandler that serves the captcha image.
public string HttpHandlerUrl { get; set; }
The HTTPHandler should either be registered in the application configuration file, or a file with the specified name should exist at the location, which HttpHandlerUrl points to.
If a file is to serve the files, it should inherit the class Telerik.Web.UI.WebResource
Gets or sets a bool value indicating whether the RadCaptcha should ignore the case of the letters or not.
public bool IgnoreCase { get; set; }
Bool value indicating whether the RadCaptcha should ignore the case or not.
Gets or sets the storage medium for the CaptchaImage.
public CaptchaImageStorage ImageStorageLocation { get; set; }
Gets or sets a value indication where the CaptchaImage is stored.
When the image is stored in the session the RadCaptcha HttpHandler definition (in the web.config file) must be changed from type="Telerik.Web.UI.WebResource" to type="Telerik.Web.UI.WebResourceSession" so that the image can be retrieved from the Session.
Gets or sets the invisible textbox strategy label text.
public string InvisibleTextBoxLabel { get; set; }
The invisible textbox strategy label text.
Gets or sets a value indicating whether the user-entered content in the RadCaptcha control passes validation.
public bool IsValid { get; set; }
Implements:
Gets or sets the minimum number of seconds the form must be displayed before it is valid. If you're too fast, you must be a robot.
public int MinTimeout { get; set; }
The minimum number of seconds the form must be displayed before it is valid.
Gets or sets the text displayed in the MissingPlugin download link.
public string MissingPluginText { get; set; }
Gets or sets the name of the JavaScript function that will be called when the RadCaptcha is loaded on the page.
[ClientControlEvent]
[ClientPropertyName("load")]
public string OnClientLoad { get; set; }
Gets or sets which strategies are/to be used for automatic robot discovery.
public RadCaptcha.ProtectionStrategies ProtectionMode { get; set; }
The Modes used for Spam Protection.
Gets or sets the access key for generating new captcha image.
public string RefreshImageAccessKey { get; set; }
Gets or sets the tab index of the RadCaptcha text box.
public override short TabIndex { get; set; }
The tab index of the RadCaptcha text box.
Overrides:
Composite property containing decoration options of the inner TextBox control
[PersistenceMode(PersistenceMode.InnerProperty)]
public WebControlDecorator TextBoxDecoration { get; }
Composite property containing decoration options of the inner Label control
[PersistenceMode(PersistenceMode.InnerProperty)]
public WebControlDecorator TextBoxLabelDecoration { get; }
Gets the TextBox that is being validated by the RadCaptcha.
[Browsable(false)]
public TextBox ValidatedTextBox { get; }
Returns a TextBox object that is being validated by the RadCaptcha.
Gets or sets the ID of the textbox to be validated, when only the RadCaptcha image is rendered on the page.
public string ValidatedTextBoxID { get; set; }
String value indicating the ID of the textbox to be validated, when only the RadCaptcha image is rendered.
Gets the ITextControl that is being validated by the RadCaptcha.
public ITextControl ValidatedTextControl { get; }
Gets or sets the validation group.
public string ValidationGroup { get; set; }
The validation group.
Methods
Gets the CSS class set to the RadCaptcha after validation occurs. If RadCaptcha.IsValid=true, the "rcValid" is returned and "rcInvalid" when the captcha is not valid.
Raises the CaptchaValidate event before the default validation executes.
protected virtual void OnCaptchaValidate(CaptchaValidateEventArgs e)
A CaptchaValidateEventArgs that contains the event data.
Performs validation of the RadCaptcha control.
public void Validate()
Implements:
Events
Adds or removes an event handler method from the CaptchaValidate event. The event is fired before the RadCaptcha is validated.
public event RadCaptchaEventHandler CaptchaValidate