AutoPostback in the Listbox

来源:互联网 发布:农村淘宝佣金在哪看 编辑:程序博客网 时间:2024/06/18 08:30
Hi,

How do we make a visual basic listbox to respond directly when the user clicks on the items in the textbox? (such as making a menu appear or displaying info in a label when the items are clicked)

I have used the SelectedIndexChange event but nothing happens when the listbox items are clicked. The SelectedIndexChange event only seems to work when a button is added. It seems that the button's click event gets the listbox's selectedindex change event to start working. The listbox's textchanged event doesnt seem to work also.

Is there any way to make the listbox respond directly to the user's clicks without the use of button controls?



i've found out how to make the listbox respond to its items being clicked

The AutoPostback property has to be set to true.

Thanks both for the replies......they also help to clear up the wrong concepts I had previously


原创粉丝点击