我们如何在asp.net中使用Listbox的双击事件? [英] How can we use Double click event for Listbox in asp.net?

查看:74
本文介绍了我们如何在asp.net中使用Listbox的双击事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai。



在我的Page.aspx页面中,我有一个列表框和按钮。现在列表框将显示dtectory中的所有文件夹(C:\\ \\\)。然后我选择列表框中的任何文件夹并按下按钮它将显示所选文件夹的子文件夹。而不是单击按钮我想在ListBox中执行该操作双击..,它可能吗?我怎样才能实现这一点??



在此先感谢





问候

Jithesh A

Hai.

In my Page.aspx page I am having 1 listbox and button .Now the list box will display all the folders in dtectory(C:\\) .Then I select any folder in Listbox And press button It will display Sub folder of selected folder.Instead of Clicking button I want to do that operation in ListBox Double click..,Is it Possible?How can I achieve this??

Thanks In Advance


Regards
Jithesh A

推荐答案

简单!为此,您可以在Double Click事件中调用该函数。只需删除Click事件的事件处理程序,并将该处理程序附加到Double click处理程序。这样,事件将在Double Click事件发生时触发。



欲了解更多信息,请阅读: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mousedoubleclick(v = vs.110)的.aspx [ ^ ]
Easy! For that you can invoke the function on the event of Double Click. Just remove the event handler for Click event, and attach that handler to the Double click handler. This way, the event would trigger when the Double Click event takes place.

For more, read this: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mousedoubleclick(v=vs.110).aspx[^]


请阅读下面的类似问题。



http://forums.asp.net/t/1089776.aspx?Double+click+event+ for + listbox + control [ ^ ]
Please read below for similar issue.

http://forums.asp.net/t/1089776.aspx?Double+click+event+for+listbox+control[^]


这篇关于我们如何在asp.net中使用Listbox的双击事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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