CaptchaTagHelper
Kendo UI Captcha TagHelper CaptchaTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-captcha", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("captcha-editor", TagStructure = TagStructure.NormalOrSelfClosing, ParentTag = "form-item")]
[HtmlTargetElement("captcha-editor", TagStructure = TagStructure.NormalOrSelfClosing, ParentTag = "property-grid-item")]
[RestrictChildren("messages", new string[] { "handler", "audio-handler", "validation-handler" })]
public class CaptchaTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IKendoFormEditor
Inheritance: objectTagHelperTagHelperBaseCaptchaTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-captcha name="captcha" audio-button="true">
<handler url="/captcha/getimage" />
</kendo-captcha>
Child Tags
Constructors
Initializes a new instance of the CaptchaTagHelper class with the specified generator.
Properties
Toggles the audio button.
public bool? AudioButton { get; set; }
The ID of the captcha to be added to the hidden input initially. If not set the handler to reset the ID will be called.
public string CaptchaId { get; set; }
The source of an image to be rendered as captcha initially. If not set the handler to reset the image will be called.
public string CaptchaImage { get; set; }
The field that returns the captcha's image source. Used in the handler function/response that resets the captcha's image and id.
[HtmlAttributeName("datacaptchafield")]
public string DataCaptchaField { get; set; }
The field that returns the captcha's id. Used in the handler function/response that resets the captcha's image and id.
[HtmlAttributeName("datacaptchaidfield")]
public string DataCaptchaIdField { get; set; }
An expression to be evaluated against the current model.
public ModelExpression For { get; set; }
IsNested member.
[HtmlAttributeNotBound]
public bool IsNested { get; set; }
Implements:
The name of the JavaScript function that will handle the change event. Fired when users changes the input of the Captcha component.
public string OnChange { get; set; }
The name of the JavaScript function that will handle the error event. Fired when a request triggered by the component fails - can be distinguished via the type argument in the event data.
public string OnError { get; set; }
The name of the JavaScript function that will handle the requestEnd event. Fired when a request to a handler is finished - can be distinguished via the type argument in the event data.
public string OnRequestEnd { get; set; }
The name of the JavaScript function that will handle the requestStart event. Fired when the captcha makes a request to a handler - can be distinguished via the type argument in the event data.
public string OnRequestStart { get; set; }
Toggles the reset button.
public bool? ResetButton { get; set; }
Whether to trigger validation when input is blurred. This option is useful if you are not using the Kendo Validator or the Kendo Form widgets as it enables to automatically trigger remote validation and use the widet's API in custom validation scenario.
public bool? ValidateOnBlur { get; set; }
Whether to show a volume control when audio is played.
public bool? VolumeControl { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
TryAddAsEditor method.
public bool TryAddAsEditor(TagHelperContext context)
The result.
Implements:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: