<asp:DropDownList ID="ddlList" runat="server" OnSelectedIndexChanged="ddlList_click" AutoPostBack="true">
</asp:DropDownList>
protected void ddlList_click(object sender, EventArgs e)
{ 触发时要做的事情 }
在控件中增加 AutoPostBack="true",可以触发事件,但会刷新整个页面,为了使改变控件值的时候,不刷新页面,可以增加updatepanel控件。
<asp:UpdatePanel ID ="UpdatePanel1" runat ="server">
<ContentTemplate>
</ContentTeplate>
</asp:UpdatePanel>