ASP.NET File Upload Progress - Client-side events

This example demonstrates some available client-side events.

Example code

<%@ Register TagPrefix="fup" Namespace="OboutInc.FileUpload" Assembly="obout_FileUpload" %>
...
<script type="text/JavaScript">
function Clear(){
 document.getElementById("<%=uploadedFilesNumber.ClientID %>").innerHTML = "";
}
function Refresh(info){
 document.getElementById("<%=uploadedFilesNumber.ClientID %>").innerHTML =
         'uploaded '+info.Bytes+' bytes from '+info.RequestSize+' ...';
}
</script>
...
<input type=file name="myFile1"><br/>
<input type=file name="myFile2"><br/>
<input type=file name="myFile3"><br/>
<input type=submit value="submit" name="mySubmit"><br/>

<fup:FileUploadProgress
     OnClientProgressStopped="function(){alert('My custom OnClientProgressStopped event');}"
     OnClientProgressStarted="Clear"
     OnClientProgressRefreshed="Refresh"
     OnClientSubmitting="function(){}"
     ShowUploadedFiles="true"
     runat="server"
/>
<asp:Label runat="server" id="uploadedFilesNumber" Text="" />