开发者

UpdateProgress and FileUpload problem

开发者 https://www.devze.com 2022-12-09 05:43 出处:网络
I have a fileupload control with an updatePprogress in an updatePanel like this: UpdatePanel is: updExtraSmall

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

UpdatePanel is: updExtraSmall

    <Triggers>
        <asp:PostBackTrigger ControlID="lnkEx开发者_如何学GotraSmall" />
    </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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消