0

我正在使用visualStudio 2010 vb

我在 TabContainer 中有一个 UpdateProcess,我无法让它显示加载图像。我在示例代码下面添加了。我错过了一些让它显示的东西吗?

<asp:TabContainer ID="TabSelection" runat="server" ActiveTabIndex="0" 
        Width="1126px" Font-Bold="True" TabStripPlacement="Top" 
        style="margin-right: 34px; margin-top: 49px;" AutoPostBack="True">
  <asp:TabPanel runat="server" HeaderText="Scorecard3" ID="TabScorecard3">
   <HeaderTemplate>
     Scorecard
   </HeaderTemplate>

        <ContentTemplate>

<asp:UpdateProgress ID="UProc_Scorecard" runat="server" AssociatedUpdatePanelID="UP_Scorecard"
  DisplayAfter="1">
<ProgressTemplate>
     <asp:Image id="wait" runat="server" ImageUrl="~/Images/wait3.gif" />
</ProgressTemplate>
</asp:UpdateProgress>

        <asp:UpdatePanel ID="UP_Scorecard" runat="server"> 
         <ContentTemplate>

        … 3 Grids and 3 tables …

        </ContentTemplate>
        <Triggers>
        <asp:AsyncPostBackTrigger ControlID="DateSelection" 
                EventName="SelectedIndexChanged"/>
                <asp:AsyncPostBackTrigger ControlID="GroupSelection" 
                EventName="SelectedIndexChanged"/>
        </Triggers>
        </asp:UpdatePanel>

    </ContentTemplate>
  </asp:TabPanel>
</asp:TabContainer>

谢谢

4

1 回答 1

0

我通过将 UpdateProgress 和 updatePannel 移到 TabContainer 之外解决了这个问题,我还删除了 tabcontainer 中的自动回发,以防止每次选择选项卡时回发。我希望这可以帮助别人。下面的示例代码...

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>

<asp:UpdateProgress ID="UProc_TabContainer" runat="server" AssociatedUpdatePanelID="UP_TabContainer"
    DisplayAfter="1">
    <ProgressTemplate>
        <div id="dvProgress" runat="server" style="position: absolute; top: 300px; left: 450px;
            text-align: center;">
            <asp:Image ID="wait" runat="server" ImageUrl="~/Images/wait3.gif" Height="120px"
                Width="128px" />
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>

<asp:UpdatePanel ID="UP_TabContainer" runat="server">
    <ContentTemplate>
        <asp:Panel ID="Panel1" runat="server" BackColor="#66FFFF">

                        <asp:DropDownList ID="DateSelection" runat="server" AutoPostBack="True" Height="21px"
                            Width="134px">
                        </asp:DropDownList>

                        <asp:DropDownList ID="GroupSelection" runat="server" AutoPostBack="True" Height="21px"
                            Width="134px" >
                        </asp:DropDownList>

        </asp:Panel>

        <asp:TabContainer ID="TabSelection" runat="server" ActiveTabIndex="0" Width="1126px"
            Font-Bold="True" TabStripPlacement="Top" 
            Style="margin-right: 34px; margin-top: 49px;">
            <%-- AutoPostBack="True"--%>
            <asp:TabPanel runat="server" HeaderText="Scorecard3" ID="TabScorecard3">
                <HeaderTemplate>
                    Scorecard
                </HeaderTemplate>
                <ContentTemplate>
                    … grids and charts …
                </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel runat="server" HeaderText="Documentation" ID="TabInfo">
                <ContentTemplate>
                    … documentation …
                </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel ID="Project" runat="server" HeaderText="Project">
                <ContentTemplate>
                    … documentation…
                </ContentTemplate>
            </asp:TabPanel>
        </asp:TabContainer>
    </ContentTemplate>
</asp:UpdatePanel>
于 2013-03-25T11:02:53.013 回答