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

Server-side Events

Event log

RadButton exposes several server-side events that allow easy and flexible use in a wide range of application scenarios:

  • OnClick—raised when the RadButton is clicked and AutoPostBack=true.
  • OnCommand—raised when the RadButton is clicked and AutoPostBack=true. It is useful for handling commands (using the CommandName and CommandArgument properties).
  • OnCheckedChanged—raised when the Checked property of the RadButton, with ButtonType=ToggleButton, is changed.
  • OnToggleStateChanged—raised when the Selected property of the RadButton, with ButtonType=ToggleButton, is changed.
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.ServerSideEvents.DefaultVB" %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-thin">
        <telerik:RadButton RenderMode="Lightweight" ID="btnStandard" runat="server" Text="Standard Button" CommandName="Play"
            OnClick="Button_Click" OnCommand="CommandBtn_Click">
        </telerik:RadButton>
        <div style="padding: 5px">
        </div>
        <telerik:RadButton RenderMode="Lightweight" ID="btnCheckBox" runat="server" ButtonType="ToggleButton" ToggleType="CheckBox"
            Text="CheckBox Button" CommandName="Play" OnClick="Button_Click" OnCommand="CommandBtn_Click"
            OnCheckedChanged="Check_Clicked">
        </telerik:RadButton>
        <div style="padding: 5px">
        </div>
        <telerik:RadButton RenderMode="Lightweight" ID="RadButton1" runat="server" ButtonType="LinkButton" ToggleType="CustomToggle"
            Text="CustomToggle Button" CommandName="Play" OnClick="Button_Click" OnCommand="CommandBtn_Click"
            OnToggleStateChanged="ToggleState_Changed">
            <ToggleStates>
                <telerik:RadButtonToggleState Text="ToggleButton: Mute"></telerik:RadButtonToggleState>
                <telerik:RadButtonToggleState Text="ToggleButton: Low"></telerik:RadButtonToggleState>
                <telerik:RadButtonToggleState Text="ToggleButton: Medium"></telerik:RadButtonToggleState>
                <telerik:RadButtonToggleState Text="ToggleButton: High"></telerik:RadButtonToggleState>
            </ToggleStates>
        </telerik:RadButton>
    </div>
    <qsf:EventLogConsole ID="EventLogConsole1" runat="server" AllowClear="true" Height="300px"></qsf:EventLogConsole>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance