0

我有一个按钮设置来将我的gridviews 导出到word。一切正常,除了我找不到启动/取消我modalpopupextender用来表明正在处理的方法。如果我添加它,单击按钮: btnExportToWord.Attributes.Add("onclick", "StartProgressBarNoValid()")它不会取消modalpopupextender

这是我使用的更新面板和 javascript 函数。

 function StartProgressBarNoValid() {
     var myExtender = $find('ProgressBarModalPopupExtender');
     ProgressImg = document.getElementById('MyImage');
     setTimeout("ProgressImg.src = ProgressImg.src", 10);
     myExtender.show();
     return true;
 }

<asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
    <ContentTemplate> 
        <div> 
            <cc1:ModalPopupExtender ID="ProgressBarModalPopupExtender" runat="server"
            backgroundCssClass="ModalBackground" behaviorID="ProgressBarModalPopupExtender" 
            TargetControlID="hiddenField1" PopupControlID="Panel1" />
                <asp:Panel ID="Panel1" runat="server" Style="display: none; background-color: #C0C0C0;"> 
                    <img id="MyImage" src="../Images/Vista_Searching_Bar.gif" alt="" />
                    <div id="processMessage" style="width:200px;" ><br /><br />&nbsp;&nbsp; Loading...<br /><br />
                    </div>
                </asp:Panel> 
                <asp:HiddenField ID="HiddenField1" runat="server" />
        </div> 
    </ContentTemplate> 
</asp:UpdatePanel>
4

1 回答 1

0

代码隐藏ProgressBarModalPopupExtender.Show() 有什么问题 ?ProgressBarModalPopupExtender.Hide()

于 2012-09-21T16:19:24.270 回答