1
我有一個網頁下拉列表下拉沒有發射OnSelectedIndexChanged
<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;
}
對於somereason標籤從不更新的SelectedIndexChanged事件在不觸發所有我需要在這個事件中添加一個動態網格。任何線索?
設置下拉屬性的AutoPostBack = 「真」 – 2013-05-01 18:51:46