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

ButtonEventBuilder

Methods

Click(System.String)

Fires when the Button is clicked with the mouse, touched on a touch device, or ENTER (or SPACE) is pressed while the Button is focused.

For more information see Click event.

Parameters

handler - System.String

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

Example


             @( Html.Kendo().Button()
                        .Name("Button")
                        .Events(events => events
                            .Click("onClick")
                        )
            )

Click(System.Func)

Fires when the Button is clicked with the mouse, touched on a touch device, or ENTER (or SPACE) is pressed while the Button is focused.

For more information see Click event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


             @( Html.Kendo().Button()
                        .Name("Button")
                        .Events(e => e.Click(
                                 @<text>
                                    function(e){
                                        event handling code
                                    }
                                 </text>
                        ))
            )

In this article
Not finding the help you need?