日期:2014-05-19  浏览次数:20385 次

用select控件怎么触发不了onserverchange事件?
<select   name= "ss "     id= "ss "   runat= "server "   onserverchange= "ss_change ">
<option   value= "1 "> 1 </option>
<option   value= "2 "> 2 </option>
</select>
这么写对吗?怎么就是触发不了后台代码呢?

------解决方案--------------------
不对.
------解决方案--------------------
还设置postback为true
------解决方案--------------------
<asp:DropDownList ID= "DropDownList1 " OnSelectedIndexChanged= "chg " runat= "server " AutoPostBack= "true ">
<asp:ListItem Value= "1 "> 1 </asp:ListItem>
<asp:ListItem Value= "2 "> 2 </asp:ListItem>
</asp:DropDownList>


------解决方案--------------------
嗯,楼上的都说完了
------解决方案--------------------
要用服务器控制,HTML控件不行的, 用asp:DropDownList 楼上的说的很~~~清楚啦