Server Side Events

9 Mar 20161 minute to read

The following are the server side events available in the CheckBox control.

Event

Event Description

Argument Details

OnChange It raises when the Checkbox status is changed from checked to uncheck / unchecked to check. Event Argument contains the following parameters,e.IsChecked – Status of Checkbox.e.EventType – Event Name.Arguments – Contain keys and values for IsChecked.

In the ASPX page, add the CheckBox control to configure Checkbox events.

  • HTML
  • <%--Adds serverside event for CheckBox control as follows--%>
    
    
    
    <ej:CheckBox ID="Checkbox" runat="server" Text="Milk" OnChange="CheckBox_Change">
    
    </ej:CheckBox>

    Define Checkbox_Change server side event in the code behind.

  • C#
  • protected void Checkbox_Change(object sender, Syncfusion.JavaScript.Web.CheckBoxEventArgs e)
    
    {
    
    
    
    //e.IsChecked – Status of Checkbox
    
    //e.EventType – Event Name
    
    //e.Arguments – Contain keys and values for IsChecked
    
     }