これは既知の動作ですか? もしそうなら、どうすればそれを機能させることができますか?
2 つの更新パネルがあります。それぞれの内部に DropDownList コントロールがあります。
最初の DropDownList をセットアップ (バインド) するボタンが 1 つあります。これは機能します。
最初の DropDownList を変更すると、2 番目の DropDownList が更新されます。
何らかの理由で、2 番目のドロップダウン リストが更新されません。
疑似コードは次のとおりです。
1 回目の更新パネルと DropDownList:
<asp:Button ID="btnSet" runat="server"></asp:Button>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server"
onselectedindexchanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSet" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList2" runat="server"></asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
コードビハインド:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
BindSecondDropDownList();
}
これを理解するのを手伝ってください。