我有级联下拉列表,我希望第一个ddl触发一个函数并加载第二个ddl和第二个ddl触发另一个函数并加载第三个ddl。
当我选择第一个ddl时,第二个加载ok,但是当我选择第二个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>