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

RequestStart event

The RequestStart client-side event handler is called when a request to the server is started.

The event can be initially triggered by an initiating control configured in the AjaxManager settings, a control within an AjaxPanel, or by a client-side ajaxRequest() call. The event can be cancelled.

Two parameters are passed to the event handler with the following methods:

  • sender—The instance of the client-side RadAjaxManager or RadAjaxPanel object.

  • eventArgs—Provides the following methods:

    • set_cancel()—Lets you permit or block the AJAX request from continuing. Calling set_cancel(true) prevents the request from continuing.

    • get_eventTarget()—Gets the UniqueID of the element that had raised the request.

    • get_eventArgument()—Gets the string passed in the initial AJAX request.

    • get_eventTargetElement()—Gets the instance of the client-side object that raised the AJAX request. You can iterate each of the settings and retrieve the initiating control id and another array of objects that represent updated controls.

    • get_ajaxSettings()—Returns an array of objects that represents AjaxManager current configuration of the AjaxManager or the updated controls of the AjaxPanel.

    • get_enableAjax(), set_enableAjax()—Gets or sets if an AJAX request is performed. set_enableAjax(false) causes the request to be performed with a standard postback.

The example below displays the control that initiated the request.

<script type="text/javascript">
    function requestStart(sender, eventArgs) {
        alert('Request start initiated by: ' + eventArgs.get_eventTarget());
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <ClientEvents OnRequestStart="requestStart" />

See Also

In this article