views:

1705

answers:

2

Hi,

I want to know the client side events (like OnChange for textbox) for drop down list. Help me in this asap.

Thanks Rupa

A: 

You can assign the onchange client-side event to a DropDownList control programmatically:

DropDownListID.Attributes["onchange"] = "javaScriptFunction();";

Give a look to this article:

CMS
+1  A: 

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
RaYell
You forgot to add onchange.
rahul
Yeah, sorry. Updated my answer.
RaYell