Reputation: 1441
I want to know the client side events (like onChange) for an asp:DropDownList.
Upvotes: 25
Views: 82831
Reputation: 70414
Are you talking about ASP app? This app produces HTML code so you have all HTML events available, which for the select
tag (select
is a HTML tag for dropdown lists) are the following:
onchange
onclick
ondblclick
onmousedown
onmouseup
onmouseover
onmousemove
onmouseout
onkeypress
onkeydown
onkeyup
onfocus
onblur
Upvotes: 44
Reputation: 827496
You can assign the onchange client-side event to a DropDownList control programmatically:
DropDownListID.Attributes["onchange"] = "javaScriptFunction();";
Give a look to this article:
Upvotes: 14