2009-06-15 4 views
4

AssociatedUpdatePanelId를 할당하면 상태를 선택하면 진행률이 표시되지 않지만 비워두면 진행률이 표시됩니다. UpdateProgress 컨트롤을 가능하게 구현이 호출 제어를위한 컨트롤 계층 구조를 검색하기 때문에,AssociatedUpdatePanelId가 설정된 경우 Update Progress가 실행되지 않는 이유는 무엇입니까?

<div> 
    <asp:ListBox ID="lstStates" runat="server" AutoPostBack="True" 
    OnSelectedIndexChanged="lstStates_SelectedIndexChanged" SelectionMode="Multiple"> 
    </asp:ListBox> 
</div> 
<div> 
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
    <ContentTemplate> 
    <asp:Panel ID="pnlCounty" runat="server"> 
    <asp:ListBox ID="lstCounties" runat="server" SelectionMode="Multiple"> 
    </asp:ListBox> 
    </asp:Panel> 
    </ContentTemplate> 
    <Triggers> 
    <asp:AsyncPostBackTrigger ControlID="lstStates" EventName="SelectedIndexChanged" /> 
    </Triggers> 
    </asp:UpdatePanel> 
    <asp:UpdateProgress ID="UpdateProgress2" runat="server" DisplayAfter="1" 
         AssociatedUpdatePanelID="UpdatePanel1"> 
    <ProgressTemplate> 
    <img src="../images/loader2.gif" /> 
    Loading Counties... 
    </ProgressTemplate> 
    </asp:UpdateProgress> 
</div> 

답변

10

this article에 따르면, UpdatePanel 외부 트리거 관련의 UpdateProgress를 발생하지 않는다 : 여기

는 영문 마크 업입니다 외부 트리거가 컨트롤 계층에 나타나지 않습니다.

그러나이 기사에서는이 오류를 보완 할 JavaScript를 주입하는 것이 좋습니다. 귀하의 필요에 맞게 (잘하면) 적합하도록 수정했습니다 :

관련 문제