日期:2014-05-17  浏览次数:20397 次

dropdownlist级联
再补充个问题,我第一个dropdownlist 影响第二个dropdownlist的值
第二个dropdownlist影响其他行的隐藏与现实
我用第二个dropdownlist的selectedindexchanged事件
可是第二个dropdownlist改变时,却没有触发这个事件
反而第一个dropdownlist改变时,竟然触发这个事件
是什么原因,求解!!!!!!!!
有什么解决办法
dropdownlist

------解决方案--------------------
<asp:DropDownList ID="DDLType3" runat="server" AutoPostBack="true" onselectedindexchanged="DDLType3_SelectedIndexChanged">
   <asp:ListItem Value="A">所有</asp:ListItem>
   <asp:ListItem Value="0">未入住</asp:ListItem>
   <asp:ListItem Value="1">已入住</asp:ListItem>
   </asp:DropDownList>   

是不是缺少了AutoPostBack="true"一行代码
------解决方案--------------------
把代码贴出来吧  
------解决方案--------------------
Refer:

http://www.cnblogs.com/insus/archive/2011/07/04/2097059.html
http://www.cnblogs.com/insus/archive/2012/10/16/2725307.html
http://www.cnblogs.com/insus/archive/2013/05/10/3070348.html
------解决方案--------------------
引用:
再补充个问题,我第一个dropdownlist 影响第二个dropdownlist的值
第二个dropdownlist影响其他行的隐藏与现实
我用第二个dropdownlist的selectedindexchanged事件
可是第二个dropdownlist改变时,却没有触发这个事件
反而第一个dropdownlist改变时,竟然触发这个事件
是什么原因,求解!!!!!!!!
有什么解决办法

貌似是这个原因。
------解决方案--------------------
引用:
<asp:DropDownList ID="DDLType3" runat="server" AutoPostBack="true" onselectedindexchanged="DDLType3_SelectedIndexChanged">
   <asp:ListItem Value="A">所有</asp:ListItem>
   <asp:ListItem Value="0">未入住</asp:ListItem>
   <asp:ListItem Value="1">已入住</asp:ListItem>
   </asp:DropDownList>   

是不是缺少了AutoPostBack="true"一行代码

貌似是这个原因
------解决方案--------------------
日,我以为好高级。。。。。。。。。。。