ASP.NET File Upload Progress - Cancel Request

This example demonstrates how to cancel data transmitting (large files uploading) from client-side.

Example code

<%@ Register TagPrefix="fup" Namespace="OboutInc.FileUpload" Assembly="obout_FileUpload" %>
...
<script type="text/JavaScript">
function Cancel(){
     <%= uploadProgress.ClientID %>_obj.CancelRequest();
}
</script>
...
<input type=file name="myFile1"><br/>
<input type=file name="myFile2"><br/>
<input type=file name="myFile3"><br/><br/>
<ASP:LinkButton runat="server" text="Submit" />&nbsp;&nbsp;&nbsp;
<ASP:LinkButton runat="server" text="Cancel request" onClientClick="Cancel();" />
<br/><br/>
<fup:FileUploadProgress
    OnClientProgressStopped="function(){alert('Files uploaded to server');}"
    ID="uploadProgress"
    InnerFiles="true"
    ShowUploadedFiles="true"
    runat="server"
/>
<fup:StatusPanel runat="server">
   <asp:Label runat="server" id="ServerResponse" Text="&nbsp;" />
</fup:StatusPanel>




Submit     Cancel request