New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI Captcha TagHelper CaptchaTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[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: IKendoFormEditorITagHelperITagHelperComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-captcha name="captcha" audio-button="true">
    <handler url="/captcha/getimage" />
</kendo-captcha>

Constructors

Initializes a new instance of the CaptchaTagHelper class with the specified generator.

C#
public CaptchaTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

Toggles the audio button.

C#
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.

C#
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.

C#
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.

C#
[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.

C#
[HtmlAttributeName("datacaptchaidfield")]
public string DataCaptchaIdField { get; set; }

An expression to be evaluated against the current model.

C#
public ModelExpression For { get; set; }

IsNested member.

C#
[HtmlAttributeNotBound]
public bool IsNested { get; set; }

Implements: IKendoFormEditor.IsNested

The name of the JavaScript function that will handle the change event. Fired when users changes the input of the Captcha component.

C#
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.

C#
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.

C#
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.

C#
public string OnRequestStart { get; set; }

Toggles the reset button.

C#
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.

C#
public bool? ValidateOnBlur { get; set; }

Whether to show a volume control when audio is played.

C#
public bool? VolumeControl { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

TryAddAsEditor method.

C#
public bool TryAddAsEditor(TagHelperContext context)
Parameters:contextTagHelperContextReturns:

bool

The result.

Implements: IKendoFormEditor.TryAddAsEditor(TagHelperContext)

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)