Results 1 to 3 of 3

Thread: Dropdownlist

  1. #1
    Join Date
    Dec 1969

    Default Dropdownlist

    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&#039;m changing the value for selectedIndex using Javascript and i&#039;ve a dropdownlist <BR>&#060;asp:dropdownlist id="test" onselectedIndexChanged="method_name"/&#062;<BR><BR>&#060;script language = "javascript"&#062;<BR>test.selectedindex=4;<BR>&#0 60;/script&#062;

  2. #2
    Join Date
    Dec 1969

    Default ***Duplicate Post**** <NM>


  3. #3
    Join Date
    Dec 1969

    Default RE: Dropdownlist

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts