Skip to main content
All docs
V25.1
  • Tab

    UploadControlClientSideEvents.BeforeSend Property

    Specifies a client function used to customize a web request before it is sent to the server.

    Namespace: DevExpress.Web

    Assembly: DevExpress.Web.v25.1.dll

    NuGet Package: DevExpress.Web

    Declaration

    [DefaultValue("")]
    public string BeforeSend { get; set; }

    Property Value

    Type Default Description
    String String.Empty

    A JavaScript function.

    Remarks

    Use this property to register a client-side handler for the Upload Control’s beforeSend event.

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentHolder" runat="Server">
    
        <script>
            function onBeforeSend(fileUpload, e) {
                /* ... */
            }
        </script>
    
        <dx:ASPxUploadControl ID="fileUpload"
                            runat="server"
                            ClientSideEvents-BeforeSend="onBeforeSend">
            <!-- ... -->
        </dx:ASPxUploadControl>
    
    </asp:Content>
    

    The function receives the following arguments:

    • The client-side Upload Control object instance.
    • An object that contains event arguments. Use the object’s request property to access and modify the underlying XMLHttpRequest (for example, add headers).
    See Also