2011-06-01 53 views
1

進度條我寫了下面在阿賈克斯更新面板不顯示

<asp:UpdatePanel ID="Download" runat="server"> 
    <ContentTemplate> 
     <asp:Label ID="lblMessage" runat="server" 
      Text="Click the link to download the Report:"></asp:Label> 
     <asp:LinkButton ID="lbtnDownload" runat="server" 
      OnClick="lbtnDownload_Click" Text="Download Excel Sheet"></asp:LinkButton> 
    </ContentTemplate> 
    <Triggers> 
     <asp:PostBackTrigger ControlID="lbtnDownload"/> 
    </Triggers> 
</asp:UpdatePanel> 

<asp:UpdateProgress ID="download1" runat="server" AssociatedUpdatePanelID="Download"> 
    <ProgressTemplate> 
     <asp:Image ID="Image1" runat="server" ImageUrl"indicator.gif" " /> 
    </ProgressTemplate> 
</asp:UpdateProgress> 

但進度條圖像不顯示任何一個可以告訴爲什麼

回答

2

拆卸:<asp:PostBackTrigger ControlID="lbtnDownload"/>

+0

感謝它的作品可以告訴我有什麼問題,如果我使用 – Vivekh 2011-06-01 08:23:15

+1

UpdateProgress用於異步回發,但您已指定lbtnDownload按鈕導致正常回發,因此整個頁面已刷新。 – 2011-06-01 08:37:58

2

好吧,首先要檢查的是你肯定回發成功,還添加了延遲間隔:

<asp:UpdateProgress DisplayAfter="0" ID="download1" runat="server" 
    AssociatedUpdatePanelID="Download"> 
+0

仍然我無法顯示圖像 – Vivekh 2011-06-01 08:16:04