更新进度不适用于更新面板中的上载按钮

时间:2017-03-07 05:47:28

标签: c# asp.net updatepanel updateprogress

我有一个功能,我uploading an excel file并再次下载其格式上传数据。

因此,我使用Update Progress来加载

  

我的更新进度适用于下载格式按钮,但它不适用于按钮上传

下面是我的aspx代码: -

<asp:UpdatePanel ID="uptc" runat="server" ChildrenAsTriggers="true">
    <ContentTemplate>
        <asp:TabContainer ID="TbTabValue" runat="server" ActiveTabIndex="0" AutoPostBack="true" OnActiveTabChanged="tc_ActiveTabChanged">
            <asp:TabPanel ID="tpEnterprise"
                HeaderText="Enterprise"
                runat="server"
                ActiveTabIndex="1"
                OnDemand="true"
                AutoPostBack="false"
                TabStripPlacement="Top"
                CssClass="ajax__tab_xp"
                ScrollBars="None"
                UseVerticalStripPlacement="true"
                VerticalStripWidth="120px"
                TabIndex="1">
                <ContentTemplate>
                    <asp:UpdateProgress ID="UpdateProgress" runat="server" DynamicLayout="False" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="0">
                        <ProgressTemplate>
                            <div class="loadingModal">
                                <div class="center">
                                    <img alt="" src="../Images/loading.gif" />
                                </div>
                            </div>
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <div class="row">
                                <div class="col-sm-4">
                                    <label>Select Category</label>
                                    <asp:DropDownList ID="ddlEnterpriseCategory" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlEnterpriseCategory_SelectedIndexChanged"></asp:DropDownList>
                                    <asp:Button runat="server" ID="btnDownloadEnterpriceExcel" Text="Download Format" Class="btn btn-default" OnClick="downloadEnterpriceExcel_Click" />
                                </div>
                                <div class="col-sm-8">
                                    <label>Upload File</label>
                                    <asp:FileUpload ID="EnterpriseFileuploader" runat="server" />
                                    <br />
                                    <asp:Button ID="btnUpload" runat="server" Text="Upload"
                                        OnClick="btnUpload_Click" Class="btn btn-default" />
                                    &nbsp;&nbsp;

                                </div>
                            </div>
                            <br />
                            <div class="row">
                                <div class="col-sm-12">
                                    <asp:Panel runat="server" ID="gvInputDataPanel">
                                        <asp:GridView ID="gvInputData" runat="server" CssClass="table table-bordered" AllowPaging="True" OnPageIndexChanging="gvInputData_PageIndexChanging" EmptyDataText="No data found."
                                            ShowHeaderWhenEmpty="True">
                                        </asp:GridView>
                                    </asp:Panel>
                                </div>
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:PostBackTrigger ControlID="btnDownloadEnterpriceExcel" />
                            <asp:PostBackTrigger ControlID="btnUpload" />
                        </Triggers>
                    </asp:UpdatePanel>
                </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel ID="tpUBR" ClientIDMode="Static" HeaderText="UBR" runat="server" TabIndex="2">
                <ContentTemplate>
                    2
                </ContentTemplate>
            </asp:TabPanel>
        </asp:TabContainer>
    </ContentTemplate>
</asp:UpdatePanel>

0 个答案:

没有答案