Server Side Events

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">
    
    </ej:ToggleButton>

    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
    }