列表框控制问题 [英] List Box Control Problem

查看:74
本文介绍了列表框控制问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Listbox控件和1个按钮控件,
当我更改列表框索引时,它会触发它selected_indexchanged事件.

但是在此更改事件之后,如果我单击按钮控件,那么还会触发前一个事件或selected_indexchanged事件,因此我无需调用该事件.

I have Listbox control and 1 button control,
when i changed listbox index then it fires it selected_indexchanged event.

But after this change event if i click on button control then also previous event or selected_indexchanged event is firing, which i need not to call that event

推荐答案

make AutoPostBack="False" EnableViewState="False"列表框的内容
make AutoPostBack="False" EnableViewState="False" of listbox


我想这是不可能的..

您应该在单独的应用程序中检查该工作,然后应用...它的主应用程序....
I thik this is not possible..

You should chek this work in seperate application then apply...it your main application....


请给我更多详细信息.我通过创建一个演示项目来尝试此操作.
我用了一个列表框控件和一个按钮.
首先我触发ListBox1_SelectedIndexChanged事件,然后我触发Button1_Click
两种情况都只发生相应的事件.
Give me more details. I try this by creating a demo project.
In it I took one listbox control and one button.
first I fire ListBox1_SelectedIndexChanged event then I fire Button1_Click
both the cases only corresponding event fire.


这篇关于列表框控制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆