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

Server-side Events

Select a command
  • Command 1
  • Command 2
  • Command 3
Event log

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

  • OnClick—raised when the RadSplitButton is clicked and AutoPostBack is set to true.
  • OnCommand—raised when the RadSplitButton is clicked and AutoPostBack is set to true. It is useful for handling commands (using the CommandName and CommandArgument properties). When button is clicked e.CommandName is the CommandName set for the SplitButton itself. When Item in the ContextMenu is clicked, the e.CommandName is the Value of the clicked item.
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.SplitButton.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-containers">
        <div class="demo-container size-thin">
            <telerik:RadSplitButton runat="server" ID="RadSplitButton1" Text="Select a command" CommandName="Select" Width="200px"
                OnCommand="RadSplitButton1_Command" OnClick="RadSplitButton1_Click">
                <ContextMenu runat="server">
                    <Items>
                        <telerik:RadMenuItem Text="Command 1" Value="command1"></telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Command 2" Value="command2"></telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Command 3" Value="command3"></telerik:RadMenuItem>
                    </Items>
                </ContextMenu>
            </telerik:RadSplitButton>

            <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadSplitButton1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="EventLogConsole1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>

            <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
        </div>
    </div>
    <qsf:EventLogConsole ID="EventLogConsole1" runat="server" AllowClear="true" Height="200px"></qsf:EventLogConsole>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance