How do I update the web form after the file is saved?

Jul 24, 2008 at 12:57 AM
I would like to update the web form after a file is saved. For example I might want to populate a TextBox control with the the name of the file that was uploaded. I tried setting the Text property in the FileReceived event but the web page never shows the new value. Is there a special way of doing this?
Coordinator
Jul 24, 2008 at 1:12 AM

Use client side code:

<fjx:FileUploader ID="FileUploader1" runat="server" >
    <Adapters>
        ...
    </Adapters>
    <ProgressBarChangeJsFunction><![CDATA[
function(bar, percDiv, percentage, progress, loadedBytes, currentFileLoadedBytes){
  if(!!bar){
    bar.style.width =
      ((progress == 0 || progress == 1) ? 0 : (progress * this.getProgressBarWidth()))+"px";
  }
  if(!!percDiv){
    percDiv.innerHTML = (progress == 0 || progress == 1) ? "":(percentage + "%");
  }
  if(progress == 1){
    // do what you want to do here
    // for example to refresh the page: 
    //document.location.href = document.location.href;
  }
}
    ]]></ProgressBarChangeJsFunction>
</fjx:FileUploader>