dropdownlist 事件,DropDownList无法触发事件?why?来者有分!

DropDownList无法触发事件?why?来者有分! - 故障解答 - 电脑教程网

DropDownList无法触发事件?why?来者有分!

日期:2007-08-07   荐:
DropDownList无法触发事件?why?来者有分!这是代码:Private Sub PayType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PayType.SelectedIndexChanged If PayType.SelectedValue = "haha" Then Label13.Visible = True Label14.Visible = True Label15.Visible = True Label16.Visible = True CardType.Visible = True End If End Sub----------而且DropDownList的Autopostback属性,我已经设置为true了.里面的5个true事件.都没办法触发?很奇怪啊.为什么.急菜鸟這裡的代碼完全正確,可以解釋的估計你在Page_Load裡面寫了關於這個DropDownList的代碼但是沒有放在Ispostback裡面up我page_load里面没写关于他的事件啊.怎么回事?预览的时候,他可以刷新,可是他左下角会弹出完毕,然后一个"!"(感叹号).如果有写其他东西.怎么写?你只要把IF语句中的If PayType.SelectedValue = "haha" Then改成:If PayType.SelectedItem = "haha" Then .就可以了.to beiguren()按照你说的改,还是同样的错误啊?太奇怪了.帮忙啊.我用的是vb.net的.给你的Page_Load里面的东西加上if(!Page.IsPostBack){}预览的时候,他可以刷新,他左下角会弹出"完毕",然后一个"!"(感叹号).我也设置了断点,可断点根本就不走.就跟没Private Sub PayType_SelectedIndexChanged(ByVal...一样.那个if ont page.ispostback then ........... end if 我也加了.还有那个DropDownList的Autopostback属性,我已经设置为true了.郁闷要死了拉.
标签: