Hi,
I need to add the OnClick event to asp:DropDownList control, due to the existing events don't satisfy my current needs.
Is it possible to achieve this?
Thank you very much.
Hi,
I need to add the OnClick event to asp:DropDownList control, due to the existing events don't satisfy my current needs.
Is it possible to achieve this?
Thank you very much.
What reason do you have for wanting an OnClick
event on the DropDownList
control? If you were to implement an OnClick
server-side event on the DropDownList
the user would never be able to select any of the list items. This is because in order to fire a Server-Side OnClick, a postback would be required. I.e. the user would click the DropDownList, a postback would instantly occur and they wouldn't be able to select a value.
It sounds like a case of trying to fix the wrong problem, however you could probably try and use the "onclick" JavaScript attribute and handle whatever you're trying to do using client side script and AJAX
?