PushButton - Server-side Events

Event log

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

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

  • OnClick—raised when the RadStandardButton is clicked and AutoPostBack is set to true.
  • OnCommand—raised when the RadStandardButton is clicked and AutoPostBack is set to true. It is useful for handling commands (using the CommandName and CommandArgument properties).
  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="PushButton.ServerSideApi.ServerSideEvents.DefaultCS" %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<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:RadPushButton runat="server" ID="RadPushButton1" Text="Click Me!" CommandName="Play"
                OnClick="Button_Click" OnCommand="CommandBtn_Click" />

            <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadPushButton1">
                        <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>

Find Assistance

Help Us Improve

Was this example helpful?