New to Telerik UI for ASP.NET Core? Start a free 30-day trial
Events
The Telerik UI for ASP.NET Core OTPInput exposes an event that allows you to control and customize the behavior of the UI component.
For a complete example on the basic OTPInput event, refer to the demo on using the events of the OTPInput.
Handling by Handler Name
The following example demonstrates how to subscribe to events by handler name.
Razor
@(Html.Kendo().OTPInput()
.Name("otp")
.Items(5)
.Events(e => e.Change("onChange"))
)
Handling by Template Delegate
The following example demonstrates how to subscribe to events by using a template delegate.
Razor
@(Html.Kendo().OTPInput()
.Name("otp")
.Items(5)
.Events(e => e
.Change(@<text>
function() {
// Handle the change event inline.
}
</text>)
)
)