我有一个带有下拉列表的页面
<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
<asp:DropDownList ID="DropDownList1" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem>Cellsite</asp:ListItem>
<asp:ListItem>Agreement</asp:ListItem>
<asp:ListItem>Event</asp:ListItem>
<asp:ListItem>User</asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" ID="EntityName"></asp:Label>
<ig:WebScriptManager ID="WebScriptManager1" runat="server"></ig:WebScriptManager>
<ig:WebDataGrid ID="EntityGrid" runat="server" Width="100%">
<Behaviors>
<ig:Sorting>
</ig:Sorting>
</Behaviors>
</ig:WebDataGrid>
后面的代码是
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
EntityName.Text = DropDownList1.SelectedItem.Text;
}
由于某种原因,标签永远不会更新,事件 selectedindexchanged 根本没有触发我需要在这个事件中添加一个动态网格。有什么线索吗?