Using FileUploader with Progress Indicator

This article show how to enable progress indicator with Mediachase FileUploader

Progress indicator allows user to see the status of upload and how much time left.

[View Sample C#] [View Sample VB.NET]

In order to enable progress indicator you will have to follow this steps:

  • Handle submit event and Retrieve upload UniqueID
    <INPUT id="btnUpload" type="submit" value="Upload" runat="server" 
    onclick="ShowProgress()" NAME="btnUpload">
    		
    <script language="javascript">
    function ShowProgress()
    {
    	var w = 300;
    	var h = 140;
    	var l = (screen.width - w) / 2;
    	var t = (screen.height - h) / 2;
    	winprops = 'resizable=0, height='+h+',width='+w+',top='+t+',left='+l+'w';
    	var f = window.open('Progress.aspx?ID='+document.forms[0].__MEDIACHASE_FORM_UNIQUEID.value, 
    	"_blank", winprops);
    }
    </script>
    
  • Open new Progress Indicator page and update it regulary
    <script language="javascript">
    function refresh()
    {
    	document.forms[0].submit();
    }
    </script>
    
  • Get updated upload information using UniqueID
    McFormProgress.GetFormPostProgress(ID,out Received,out Total,out PostCompleted);


Copyright 2005 Mediachase. All rights reserved.