Server Side Events

4 Mar 20161 minute to read

The following given server side even is available in the ToggleButton control.

Event Event Description Argument Details
OnChange It is raised when the Toggle Button is clicked.
Event Argument contains the following parameters:

e.Status - Status of ToggleButton.

e.IsChecked - Checked Status of ToggleButton

e.EventType - Event Name

e.Arguments - Contain keys and values for Status.

In the ASPX page, add the Button control to configure the ToggleButton events.

  • HTML
  • <ej:ToggleButton ID="ToggleButton_Prevent" runat="server" Size="Small" DefaultText="Play" ActiveText="Pause" OnChange="ToggleButton_Prevent_Change">

    The code Define ToggleButton Prevent Change server side event in behind.

  • C#
  • protected void ToggleButton_Prevent_Change(object Sender, Syncfusion.JavaScript.Web.ToggleButtonEventArgs e)
    	//e.Status – Status of the ToggleButton
    	//e.EventType – Event Name
    	//e.IsChecked – Checked Status of the Togglebutton
    	//e.Argument – Contain keys and values for Status