I'm not sure this is the correct place to post this, but I've found some glaring bugs in both the TabContainer and Accordion controls.
I did not notice this before until I decided to put more than 1 DropDownList in a TabContainer with AutoPostBack="true"
Create a form, add a TabContainer and add a TabPanel.
Inside the TabPanel, add 3 dropdownLists (w/some dummy data) in the ContentTemplate
Set AutoPostBack="true" on the controls.
On the code behind, create 3 event handlers for the SelectedIndexChanged events.
Put a break point on each of the 3 subs.
Run the page.
Make a selection from 1 of the dropDownLists:
The codebehind breakpoint for that DropDownList fires once, the first time it loads.
Now, step through the debugger til the page is refreshed again.
Now, go to a different dropDownList and make a selection.
- the page posts back a second time, but now, not only does the DropDownList you just changed SelectedIndexChanged event fire, but the PREVIOUS one you selected ALSO fires!
- Now change the selection of the 3rd DropDownList, and you will find that the other 2 DropDownLists will fire their SelectedIndexChanged events (even though they are not selected!).
The Accordion control has the same (extra event firing) problem.
Protected Sub DropDownList1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DropDownList1.SelectedIndexChanged
End Sub
Protected Sub DropDownList2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DropDownList2.SelectedIndexChanged
End Sub
Protected Sub DropDownList3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DropDownList3.SelectedIndexChanged
End Sub
I've spent 2 days trying different settings (ViewState on/off, using UpdatePanels, etc, etc.), but could not find any workaround for this.
Member
1 Points
27 Posts
Bugs in TabContainer and Accordion
Oct 16, 2013 09:49 PM|mc9000|LINK
I'm not sure this is the correct place to post this, but I've found some glaring bugs in both the TabContainer and Accordion controls.
I did not notice this before until I decided to put more than 1 DropDownList in a TabContainer with AutoPostBack="true"
Create a form, add a TabContainer and add a TabPanel.
Inside the TabPanel, add 3 dropdownLists (w/some dummy data) in the ContentTemplate
Set AutoPostBack="true" on the controls.
On the code behind, create 3 event handlers for the SelectedIndexChanged events.
Put a break point on each of the 3 subs.
Run the page.
Make a selection from 1 of the dropDownLists:
The codebehind breakpoint for that DropDownList fires once, the first time it loads.
Now, step through the debugger til the page is refreshed again.
Now, go to a different dropDownList and make a selection.
- the page posts back a second time, but now, not only does the DropDownList you just changed SelectedIndexChanged event fire, but the PREVIOUS one you selected ALSO fires!
- Now change the selection of the 3rd DropDownList, and you will find that the other 2 DropDownLists will fire their SelectedIndexChanged events (even though they are not selected!).
The Accordion control has the same (extra event firing) problem.
I've spent 2 days trying different settings (ViewState on/off, using UpdatePanels, etc, etc.), but could not find any workaround for this.
bug Accordion tabcontainer ajax toolkit