简体   繁体   English

UpdateProgress和FileUpload问题

[英]UpdateProgress and FileUpload problem

I have a fileupload control with an updatePprogress in an updatePanel like this: 我在updatePanel中有一个具有updatePprogress的fileupload控件,如下所示:

UpdatePanel is: updExtraSmall UpdatePanel是: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() { 和:function showWait(){

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

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

The problem is that the updateProgrss doesn't show. 问题是updateProgrss没有显示。 Can anyone help me please? 谁能帮我吗?

Thank you, 谢谢,

Alina 阿丽娜

只需使用ajaxcontroltoolkit 3.0随附的asyncfileupload控件,然后上传文件。

Put the UpdateProgress outside the ContentTemplate. 将UpdateProgress放在ContentTemplate之外。
Ref: http://msdn.microsoft.com/en-us/library/bb398821.aspx 参考: http : //msdn.microsoft.com/en-us/library/bb398821.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM