【发布时间】:2013-05-15 01:58:09
【问题描述】:
提示是“DropDownList1”没有找到“DropDownList1_SelectedIndexChanged”
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server"
onselectedindexchanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem>1</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="DropDownList1_SelectedIndexChanged" />
</Triggers>
请告诉我如何使它工作!
【问题讨论】:
-
不确定 Asp 世界,但在其他框架中,您指定事件名称,而不是事件处理程序名称,试试
EventName="SelectedIndexChanged"看看它是否有效 -
因为您的更新面板模式不是有条件的,您只需要像@Scott Selby 所说的那样添加 AutoPostBack=True
标签: c# asp.net drop-down-menu updatepanel