2009-06-15 3 views
4

AssociatedUpdatePanelIdを割り当てると、状態を選択すると進捗状況が表示されませんが、空白のままにすると進捗状況が表示されます。ここでAssociatedUpdatePanelIdが設定されていると、Update Progressが起動しないのはなぜですか?

は、ASPXマークアップです:

<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によるとUpdateProgressコントロールを有効にするの実装は、呼制御のための制御階層を検索するので、UpdatePanelのための外部トリガは、関連付けられているのUpdateProgressを発射​​していません。外部トリガーはコントロール階層に存在しません。

この記事では、このエラーを補うためにJavaScriptを注入することを推奨しています。私はあなたのニーズに合わせて(うまくいけば)それを修正しました:

関連する問題