Sys.WebForms.BeginRequestEventArgs Class

Used by the beginRequest event of the Sys.WebForms.PageRequestManager class to pass argument information to event handlers. The beginRequest event is raised just before the postback request is made.

Namespace: Sys.WebForms

Inherits: Sys.EventArgs

var args = new Sys.WebForms.BeginRequestEventArgs(request, postBackElement, updatePanelsToUpdate);



Sys.WebForms.BeginRequestEventArgs Constructor

Initializes a new instance of the BeginRequestEventArgs class.



Sys.WebForms.BeginRequestEventArgs.postBackElement Property

Gets the postback element that initiated the asynchronous postback.

Sys.WebForms.BeginRequestEventArgs.request Property

Gets the request object that represents the current postback.

Sys.WebForms.BeginRequestEventArgs.updatePanelsToUpdate Property

Gets a list of UniqueID values for UpdatePanel controls that should re-render their content, as requested by the client.

Note Note

This class contains private members that support the client-script infrastructure and are not intended to be used directly from your code. Names of private members begin with an underscore ( _ ).

Event handlers can use the request property to access the request object and the postBackElement property to determine the element that caused the postback.

The following example shows how to use the BeginRequestEventArgs class. Two buttons perform asynchronous postbacks. In the beginRequest event handler the postBackElement property is used to access the name of the element that caused the postback.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<script runat="server">

    protected void ProcessClick_Handler(object sender, EventArgs e)


<html xmlns="">
<head id="Head1" runat="server">
    <title>PageRequestManager beginRequest Example</title>
    <style type="text/css">
    body {
        font-family: Tahoma;
      background-color: #FFC080;
      top: 95%;
      left: 1%;
      height: 20px;
      width: 270px;
      position: absolute;
      visibility: hidden;
    <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" />

            <script type="text/javascript" language="javascript">
                function BeginRequestHandler(sender, args)
                     var elem = args.get_postBackElement();
                     ActivateAlertDiv('visible', 'AlertDiv', elem.value + ' processing...');
                function EndRequestHandler(sender, args)
                     ActivateAlertDiv('hidden', 'AlertDiv', '');
                function ActivateAlertDiv(visstring, elem, msg)
                     var adiv = $get(elem);
            = visstring;
                     adiv.innerHTML = msg;                     

            <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="Server">
                    <asp:Panel ID="Panel1" runat="server" GroupingText="Update Panel">
                        Last update:
                        <%= DateTime.Now.ToString()%>.
                        <br />
                        <asp:Button runat="server" ID="Button1" Text="Process 1" OnClick="ProcessClick_Handler" />
                        <asp:Button runat="server" ID="Button2" Text="Process 2" OnClick="ProcessClick_Handler" />
            <div id="AlertDiv" class="AlertStyle">