New to Telerik UI for ASP.NET MVC? Start a free 30-day trial
Events
The Telerik UI SpeechToTextButton for ASP.NET MVC exposes events like Start
, End
, Result
, and Error
, that allow you to control the behavior of the UI component.
For a complete example on basic SpeechToTextButton events, refer to the demo on using the events of the SpeechToTextButton.
Handling by Handler Name
The following example demonstrates how to subscribe to events by a handler name.
Razor
@(Html.Kendo().SpeechToTextButton()
.Name("speechButton")
.Events(ev => ev.Result("onResult"))
)
Handling by Template Delegate
The following example demonstrates how to subscribe to events by a template delegate.
Razor
@(Html.Kendo().SpeechToTextButton()
.Name("speechButton")
.Events(e => e.Result(@<text>
function() {
// Handle the SpeechToTextButton "Result" event inline.
}
</text>)
)
)