2

嗨,我在 ASP.NET 中遇到“Updateprogress”问题。如果我设置 PostBackTrigger 进度加载图像不显示,但如果我排除 PostBackTrigger 它正在工作。代码如下:

<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <Triggers>
                <asp:PostBackTrigger ControlID="Submit" />                
            </Triggers>
            <ContentTemplate>
                <asp:FileUpload runat="server" ID="Up"></asp:FileUpload>
                <asp:Button runat="server" Text="Upload" ID="Submit" OnClick="Submit_Click" CausesValidation="false" />
                <asp:UpdateProgress ID="upd" runat="server">
                    <ProgressTemplate>
                        <img alt="Checking Status" src="ajax-loader(2).gif" />
                        <%--<asp:Image runat="server" ImageUrl="~/ajax-loader(2).gif" ID="img" />--%>
                    </ProgressTemplate>
                </asp:UpdateProgress>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
4

0 回答 0