Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > DoubleClick Event on ListBox

Reply
Thread Tools

DoubleClick Event on ListBox

 
 
kgray@tecolote.com
Guest
Posts: n/a
 
      03-18-2005
I have created a user control that has a list box webcontrol.
Unfortunately, The listbox control does not have the doubleclick event
in it, and for the life of me, I can not seem to create one. Does
anyone have any tips on how to do this? The user control is this list
box, that is populated when the user control is loaded into my web page.

 
Reply With Quote
 
 
 
 
recoil@community.nospam
Guest
Posts: n/a
 
      03-21-2005
the <select control supports a client-side javascript event called
ondblclick

so you could simply create a dummy control such as a hidden button
and then using
String APostBackReferenceforsomecontrolorevent =
GetPostBackClientEvent(btnOnListBoxDblClick, "");

myListBox.Attributes.Add("ondblclick",
APostBackReferenceforsomecontrolorevent);

There are other ways of handling this and depending upon your situation
you may wish to customize it but this is a very basic example that
hopefully will get youstarted.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp.net 2 : asp:listbox doubleclick and fire event =?Utf-8?B?cGVsZWdrMQ==?= ASP .Net 1 08-31-2007 11:12 PM
ListBox Click or DoubleClick event for web apps OfurGørn ASP .Net Web Controls 4 07-29-2005 11:31 AM
No Doubleclick event on a Listbox control? Buddy Ackerman ASP .Net 1 05-19-2005 03:53 PM
Firing a function on a doubleclick event David Lozzi ASP .Net 5 03-09-2005 09:53 PM
DoubleClick on ListBox Mike ASP .Net 1 05-06-2004 11:41 AM



Advertisments