ComponentOne ToolBar for ASP.NET AJAX: Upload for ASP.NET AJAX Task-Based Help > Client-Side Tasks > Abort Uploading

Abort Uploading

To abort the file uploading on the client-side, use the C1Upload.Abort client-side method, like the following:

1.   Add a button named CancelButton to click to abort the uploading.

   <asp:Button ID="CancelButton" runat="server" Text="Cancel" CssClass="C1ProgressButton" OnClientClick="CancelClicked();"/>

2.   Create a function that calls the C1Upload.Abort method to abort the uploading once the cancel button has been clicked.

  function CancelClicked() {

        var uploadID = "<%= C1Upload1.ClientID %>";

        var upload = $find(uploadID);

        upload.abort();

    }


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.