[vb]奇怪了,为什么我的dropdownlist的onselectedindexchanged事件不起作用?
这是全篇代码
<form runat="server">
<BR>
<asp:label id="lbla" runat=server text="olkjdf" />
<asp:dropdownlist id="songlist" runat=server OnSelectedIndexChanged="changsong" style="font-size:9pt"/>
</form>
<script runat=server>
sub page_load(sender as object,e as eventargs)
dim i as short
dim lia as listitem
for i=1 to 12
lia=new listitem(i.tostring &"month")
songlist.items.add(lia)
next
end sub
sub changsong(sender as object,e as eventargs)
lbla.text=songlist.selecteditem.text
end sub
</script>
不知道为什么点了选项后不起作用!
问题点数:20、回复次数:4Top
1 楼boomshine(boomshine)回复于 2006-07-04 14:51:15 得分 4
.net的bug,重新选择一下事件,再生成一遍就可以了Top
2 楼yly19730201(我是谁)回复于 2006-07-04 14:56:35 得分 8
autopostback设置了吗Top
3 楼chenyuming2004(这辈子我算是废了)回复于 2006-07-04 15:00:23 得分 8
autopostback属性设为trueTop
4 楼singit4()回复于 2006-07-04 15:01:43 得分 0
确实是因为
autopostback=true
谢谢Top




