ListBox1.Attributes.Add("ondblClick", "{document.getElementById('" + Button1.UniqueID + "').click();return false;} ")
Now when you double click an item in the listbox, it will do the actions in the Button1_OnClick event. If you wanted to process something with the selected value in the ListBox, simply use the ListBox1.SelectedValue property within the Button1_OnClick event. A similar technique can also be used for other controls.
Simple but useful!
No comments:
Post a Comment