1

カスケードドロップダウンリストがあり、最初のddlが関数をトリガーし、2番目のddlをロードし、2番目のddlが別の関数をトリガーし、3番目のddlをロードします。

最初のddlを選択すると、2番目のddlは正常にロードされますが、2番目のddlを選択すると、CategoryList1_SelectedIndexChangedメソッドが呼び出され、すべて同じメソッドが呼び出されます。

この問題の原因がわかりません。同期も試しましたが、うまくいきません。

どんな助けでも大歓迎です乾杯

<ajax:UpdatePanel ID="CategoryPanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <div class="select">
    <ul>
       <li><strong>KATEGORI:</strong> 
        <asp:DropDownList ID="CategoryList1" AutoPostBack="true"  OnSelectedIndexChanged="CategoryList1_SelectedIndexChanged" runat="server">
        </asp:DropDownList>
        </li>
        <li><strong>MARKA:</strong> 
        <asp:DropDownList ID="CategoryList2" AutoPostBack="true"  OnSelectedIndexChanged="CategoryList2_SelectedIndexChanged" runat="server">
        </asp:DropDownList>
        </li>
        <li><strong>MODEL:</strong>
        <asp:DropDownList ID="CategoryList3" AutoPostBack="true"  OnSelectedIndexChanged="CategoryList3_SelectedIndexChanged" runat="server">
        </asp:DropDownList>
        </li>
        <li class="button"><asp:Button ID="GoButton" OnClick="GoButton_Click" Text="" runat="server" /></li>
        </ul>
    </div>
    </ContentTemplate>

     <Triggers>
            <asp:AsyncPostBackTrigger ControlID="CategoryList1" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="CategoryList2" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="CategoryList3" EventName="SelectedIndexChanged" />
    </Triggers>
</ajax:UpdatePanel>
4

0 に答える 0