dropdownlist修改了AutoPostBack='true'也不能触发SelectedIndexChanged事件
2008-12-05 12:00
609 查看
今天发现写的论坛的Search页面选择页数时不能正常跳转,然后调试发现根本没有触发SelectedIndexChanged事件,看看AutoPostBack属性也为'true',找了好一阵子也还没发现什么解决方法,后来把绑定dropdownlist的方法BindData()放到 if (!IsPostBack)外面,终于可以触发SelectedIndexChanged事件了,可是每次都是触发后,当前页面总是为1。后来发现,原来是以前修改了dropdownlist所在的层的属性为enableviewstate="true" , 直接把enableviewstate="true" 删掉,把BindData()方法放回 if (!IsPostBack)里面就可以了。
相关文章推荐
- DropDownList 事件触发问题:设置了AutoPostBack=True还是不能触发SelectedIndexChanged事件
- 为什么设置了DropDownList的AutoPostBack="True"还是不能触发SelectedIndexChanged事件?
- (论坛答疑点滴)为什么设置了DropDownList的AutoPostBack="True"还是不能触发SelectedIndexChanged事件?
- (摘抄)为什么设置了DropDownList的AutoPostBack="True"还是不能触发SelectedIndexChanged事件?
- 解决:DropDownList的AutoPostBack=True不能触发SelectedIndexChanged事件
- 为什么设置了DropDownList的AutoPostBack="True"还是不能触发SelectedIndexChanged事件?
- dropdownlist设置 AutoPostBack=True 时不能触发事件的问题
- 为什么设置了DropDownList的AutoPostBack="True"还是不能触发SelectedIndexChanged事件? 转
- OnCheckedChanged的触发需要AutoPostBack="true"
- asp:DropDownList 控件 设置AutoPostBack=true 但是OnSelectedIndexChanged仍不触发的问题。
- 在IE10下,DropDownList的AutoPostBack不能触发
- TextBox的AutoPostBack="True"引起的误会
- 当dropdownlist变化时候一定要设置autopostback=true 才能激活出发事件
- 解决mysql不能修改(You can't specify target table 'basic_data' for update in FROM clause)
- 创建触发器后不能进行修改操作,Can't update table 'psxt_user' in stored function/trigger because
- poj 2528 Mayor's posters(之前写的有BUG,CSDN博客那篇文章不能修改,现删掉重发)
- mysql超时设置的问题 using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
- ORACLE EXECUTE IMMEDIATE 'DML' 不能自动提交COMMIT 'DDL'触发COMMIT
- 注册事件为何无效,没有触发? AUTOPOSTBACK已经设置为TRUE
- using the Connector/J connection property 'autoReconnect=true' to avoid this problem.