alina
alina

Reputation: 281

UpdateProgress and FileUpload problem

I have a fileupload control with an updatePprogress in an updatePanel like this:

UpdatePanel is: updExtraSmall

    <Triggers>
        <asp:PostBackTrigger ControlID="lnkExtraSmall" />
    </Triggers>
    <ContentTemplate>
        <table>
            <tr>

                <td style="border: 1px">
                    <asp:FileUpload ID="fupldExtraSmall" runat="server" />
                </td>

                <td>
                    <asp:LinkButton ID="lnkExtraSmall" OnClientClick="javascript:showWait();" OnClick="lnkExtraSmall_click" CausesValidation="false"
                        runat="server" Text="Upload" />
                    <asp:Label ID="lblMessage" runat="server" />
                </td>
                <td>
                    <asp:Label ID="lblExtraSmallMessage" runat="server" />
                </td>
                <td>
                    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="updExtraSmall">
                        <ProgressTemplate>
                           <DIV id="IMGDIV" align="center" valign="middle" runat="server" style="position: absolute;left: 35%;top: 25%;visibility:visible;vertical-align:middle;border-style:inset;border-color:black;background-color:White">
                <img src="loading/loading.gif" /><br />                    
                </DIV>
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                </td>
            </tr>
        </table>
    </ContentTemplate>

and: function showWait() {

            if ($get('fupldExtraSmall').value.length > 0)
          {

                $get('UpdateProgress1').style.display = 'block';
            }
        }

The problem is that the updateProgrss doesn't show. Can anyone help me please?

Thank you,

Alina

Upvotes: 0

Views: 1267

Answers (2)

Just Use the asyncfileupload control which come with ajaxcontroltoolkit 3.0 and then upload the file.

Upvotes: 1

David Elizondo
David Elizondo

Reputation: 1153

Put the UpdateProgress outside the ContentTemplate.
Ref: http://msdn.microsoft.com/en-us/library/bb398821.aspx

Upvotes: 0

Related Questions