In our asp.net web application we load the dropdown list boxes in the page load. We than set the SelectedValue of each dropdown list box to an object from session. We have event handlers for many of the SelectedIndexChanged events of the drop down lists boxes, but these do not get executed when we set the selected value programmatically.
Someone else mentioned this is by design, and only when a user manually changes the drop down list selected index, will the event get raised.
I would think this is a common scenario of wanting the selectedindexchanged event handled when setting the selectedvalue/selectedindex/listitem's selected property, of a DropDownList. What is the suggested way to handle this? Is there a significant drawback of creating a custom control inherited from DropDownList that has the functionality of raising this event when changing the SelectedIndex or SelectedValue?
View Complete Post