I have an AjaxToolkit TabContainer control with a number TabPanels. Each TabPanel has a different UserControl in it to display some information. Some of these UserControls have either a LinkButton or a GridView with a command button in them. The TabContainer has AutoPostBack="false"
and this is how I would like to keep it.
When you click on the LinkButton or command button in the GridView the expected events fire and the code runs. But when the page is returned the initial tab is selected again (and not the tab the user was previously viewing).
So my question is: Is there a way to maintain the selected tab when some child control causes a postback?
Some constraints:
- I do not way to turn
AutoPostBack
on. This means the linked solution for this question question is no good in this case. - The UserControls are not always used in a TabContainer/TabPanel so the solution can not assume that this is the case.
- The solution needs to be fairly robust and straightforward as there could be different devs working on this code.