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

Defines the fluent API for configuring the Kendo UI Captcha for ASP.NET MVC events.

Definition

Constructors

Initializes a new instance of the CaptchaEventBuilder class.

C#
public CaptchaEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

The Captcha event handlers.

Methods

Defines the handler of the Change client-side event. Fired when users changes the input of the Captcha component.

C#
public CaptchaEventBuilder Change(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

CaptchaEventBuilder

Returns the current instance of CaptchaEventBuilder .

Example:
C#
@(Html.Kendo().Captcha()
.Name("captcha")
.Events(events =&gt; events.Change(@&lt;text&gt;
function(e) {
// Handle the Change event inline.
}
&lt;/text&gt;)
)
)

Defines the handler of the Change client-side event. Fired when users changes the input of the Captcha component.

C#
public CaptchaEventBuilder Change(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Change event.

Returns:

CaptchaEventBuilder

Returns the current instance of CaptchaEventBuilder .

Example:
C#
@( Html.Kendo().Captcha()
.Name("captcha")
.Events(events =&gt; events.Change("onChange"))
)

Defines the handler of the Error client-side event. Fired when a request triggered by the component fails - can be distinguished via the type argument in the event data.

C#
public CaptchaEventBuilder Error(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

CaptchaEventBuilder

Returns the current instance of CaptchaEventBuilder .

Example:
C#
@(Html.Kendo().Captcha()
.Name("captcha")
.Events(events =&gt; events.Error(@&lt;text&gt;
function(e) {
// Handle the Error event inline.
}
&lt;/text&gt;)
)
)

Defines the handler of the Error client-side event. Fired when a request triggered by the component fails - can be distinguished via the type argument in the event data.

C#
public CaptchaEventBuilder Error(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Error event.

Returns:

CaptchaEventBuilder

Returns the current instance of CaptchaEventBuilder .

Example:
C#
@( Html.Kendo().Captcha()
.Name("captcha")
.Events(events =&gt; events.Error("onError"))
)

Defines the handler of the RequestEnd client-side event. Fired when a request to a handler is finished - can be distinguished via the type argument in the event data.

C#
public CaptchaEventBuilder RequestEnd(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

CaptchaEventBuilder

Returns the current instance of CaptchaEventBuilder .

Example:
C#
@(Html.Kendo().Captcha()
.Name("captcha")
.Events(events =&gt; events.RequestEnd(@&lt;text&gt;
function(e) {
// Handle the RequestEnd event inline.
}
&lt;/text&gt;)
)
)

Defines the handler of the RequestEnd client-side event. Fired when a request to a handler is finished - can be distinguished via the type argument in the event data.

C#
public CaptchaEventBuilder RequestEnd(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the RequestEnd event.

Returns:

CaptchaEventBuilder

Returns the current instance of CaptchaEventBuilder .

Example:
C#
@( Html.Kendo().Captcha()
.Name("captcha")
.Events(events =&gt; events.RequestEnd("onRequestEnd"))
)

Defines the handler of the RequestStart client-side event. Fired when the captcha makes a request to a handler - can be distinguished via the type argument in the event data.

C#
public CaptchaEventBuilder RequestStart(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

CaptchaEventBuilder

Returns the current instance of CaptchaEventBuilder .

Example:
C#
@(Html.Kendo().Captcha()
.Name("captcha")
.Events(events =&gt; events.RequestStart(@&lt;text&gt;
function(e) {
// Handle the RequestStart event inline.
}
&lt;/text&gt;)
)
)

Defines the handler of the RequestStart client-side event. Fired when the captcha makes a request to a handler - can be distinguished via the type argument in the event data.

C#
public CaptchaEventBuilder RequestStart(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the RequestStart event.

Returns:

CaptchaEventBuilder

Returns the current instance of CaptchaEventBuilder .

Example:
C#
@( Html.Kendo().Captcha()
.Name("captcha")
.Events(events =&gt; events.RequestStart("onRequestStart"))
)