For a <select> control, we can use the onchange attribute to run some javascript when the option value changes. Intellisense would lead me to believe that the asp:ListBox control does not hold this attribute (as you’ll get underlining in visual studio telling you that this is invalid). However, this works.
<asp:ListBox ID="roleList" OnChange="someJavascriptCall()" runat="server" Visible="true" Rows="3">
Try typing that code into visual studio, and you’ll have your OnChange attribute calling you out. Why is this? Are there any side effects to using this attribute?
It’s not a valid attribute for the asp:Listbox control but it is a valid one for the html select control. Intellisense is just warning you about the former.