Inside UpdatePanel

Dec 8, 2011 at 12:06 PM

Seems that S3 control is not updating any labels inside UpdatePanel or on the page.

 

We want to tell user status with setting asp:Label on FileConfirmed event, but label does not refresh.

 

Any idea how to make it work?

Dec 8, 2011 at 12:55 PM
Edited Dec 8, 2011 at 12:56 PM

Here is a solution:

 

    <script language="javascript" type="text/javascript">
        function ConfirmUploadJsFunc(r) {
            var result = "ConfirmUploadJsFunc: isError:" + r.isError + ",isLast:" + r.isLast + ",httpStatus:" + r.httpStatus +
            ",index:" + r.index + ",bytes:" + r.bytes + ",name:\"" + r.name + "\", changedName:\"" + r.changedName + "\"";
            raiseAsyncPostback(result)
        }
        
        function raiseAsyncPostback(result) 
        { 
             __doPostBack("<%= Me.LinkButton1.UniqueID %>", result); 
        }
</script>
        <asp:UpdatePanel ID="oUpdatePanel" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional"  >
        <Triggers>
        <asp:AsyncPostBackTrigger ControlID="LinkButton1" />
        </Triggers>
    <ContentTemplate>
    <asp:Panel ID="oUploadNow" runat="server" Visible="true">
    <fjx:FileUploader ID="FileUploader1" runat="server" IsSingleFileMode="true"  UseInsideUpdatePanel="true">
    <Adapters>
        <fjx:DirectAmazonUploader  FileAccess="PublicRead"   ConfirmUploadJsFunc="ConfirmUploadJsFunc"  
        OnFileNameDetermining="FileUploader1_FileNameDetermining"
         OnConfirmUpload="FileUploader1_ConfirmUpload"
            Path="uploads"
            AccessKey="WebConfig:AWSAccessKey"
            SecretKey="WebConfig:AWSSecretKey"
            BucketName="us.content.viaway.com"  />
            
    </Adapters>

    
</fjx:FileUploader>
</asp:Panel>
<asp:Label ID="oResult" runat="server"  Text=""/>

<asp:Button ID="oTest" runat="server" Text="Test"  Visible="false"/>
<asp:Button ID="LinkButton1" runat="server" style="display:none;"  /> 

   </ContentTemplate>
    </asp:UpdatePanel>