bennyorange
New Member
When I change the selectedindex of dropdownlist programmatically, it never fires SeletedIndexChanged event. But when I change the selection either by mouse or keyboard, it fires. I'm changing the value for selectedIndex using Javascript and i've a dropdownlist <BR><asp:dropdownlist id="test" onselectedIndexChanged="method_name"/><BR><BR><script language = "javascript"><BR>test.selectedindex=4;<BR></script>.You need to do a postback to let the server recognize the selectedindexchanged event and do the stuff in the server event handler. You can try to make AutoPostBack=true in the dropdownlist control and see how that works. This will add a "onchange" attribute to the "select" html tag generated from the control... and then, maybe you can consider programmatically invoking whatever inside the onchange attribute using javascript.