I have a user control in a web part that contains an asp textbox, an asp button ('search button') and an asp listbox. I need to enable the user to do the following:
1) when the user double-clicks on an item in the listbox, automatically copy the value of the selected item into the textbox, and perform the asp button's on-click, (as if they clicked the button to run C# code-behind), or can also just
2) enter a value into the textbox and click on the button.
The second one is easy, but I cannot seem to figure out how to do the first one. I can't seem to use javascript to copy the selected item's value to the textbox because the form is not in the web part (can't use document.forms[0].mytextbox.value). I know how to have the double-click on the listbox item call javascript, but don't know how to trigger the c# code-behind.
Also, all of this includes MS Ajax 1.0 async processing (UpdatePanels, controls registered as async via ScriptManager). So, I need the double-click on the listbox item to not submit the whole page.
Ideas?