ddlOne firing, but not ddlTwo :(

liunx

Guest
Hello. I have two dropdownlist on an .aspx page. They are both set to AutoPostBack = True. This one is firing:


Private Sub ddlCommunity_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlCommunity.SelectedIndexChanged
LoadCommTextboxes()
LoadDefendantDDL()
End Sub



Private Sub ddlCommunitiesAdd_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlCommunitiesAdd.SelectedIndexChanged
LoadDefTextboxes()
End Sub


What am I doing wrong? Do I have to set something in the Page Load? When I have it in debugging mode, it fires on the first DDL, but not on the second. Any ieas?

Thanks for your help!Moved to .NETCheck the ddlCommunitiesAdd events and make sure the proper event is linked into SelectedIndexChanged.

If that's ok, then try setting AutoPostBack = True in page load rather than on the control itself.If problem persists, uninstall asp.net and reinstall asp.net.

i have had similar problems before, but its not a ddl, its a btn...one of the btn is not doing anything (not even a post back). my friend told me asp.net got messed up, reinstalled it, works fine.

-takI ran into a similar problem. It turned out that the "DataValueField" property for each of my line items was the same. The way .Net checks to see if the value has changed is by checking this "DataValueField" property. Since each of my items had the same value, then .Net thought nothing had changed, and so the event was NOT fired. Once I made sure that each DataValueField was set to a unique value, everything worked fine.
 
Back
Top