当前位置: 代码迷 >> ASP.NET >> GridView模板中使用DropdownList时候 为什么不能触发Indexchanged事件?该怎么解决
  详细解决方案

GridView模板中使用DropdownList时候 为什么不能触发Indexchanged事件?该怎么解决

热度:6410   发布时间:2013-02-25 00:00:00.0
GridView模板中使用DropdownList时候 为什么不能触发Indexchanged事件?
代码如下:
<footertemplate>
<asp:DropDownList   ID= "dropDownListWLTAlertPriority "     AutoPostBack= "true "   runat=server   width= "80px ">
            <asp:ListItem> 1 </asp:ListItem>      
            <asp:ListItem> 2 </asp:ListItem>      
            <asp:ListItem> 3 </asp:ListItem>      
            <asp:ListItem> 4 </asp:ListItem>      
            <asp:ListItem> 5 </asp:ListItem>      
</asp:DropDownList>
</footertemplate>



------解决方案--------------------------------------------------------
在 <DropDownList> 控件中添加事件OnSelectedIndexChanged= "dropDownListWLTAlertPriority_SelectedIndexChanged "
server 加双引号
即可
------解决方案--------------------------------------------------------
你的事件处理程序再哪里?
  相关解决方案