Sunday, March 11, 2012

TabControl behavior

Are you using an UpdatePanel?

If you are posting back, then the tab control will reset to the active tab index (if this is not specified it is the first tab). You can set theActiveTabIndex on the server side to set the active tab after the postback.

-Damien


I am not currently using any UpdatePanels on my webform, but I am using them any time as I might need to update data in it. Are there any issues I should be aware of before using UpdatePanels inside the TabControl?

It's a nice workaround to programatically set the ActiveTabIndex on the server side to the exact Tab I want to show, but shouldn't there be a feature in the control itself to store (via ViewState or something) the Tab which is being displayed when the a postback is fired, so that exact tab is shown after the postback?


The reason I was asking about UpdatePanels is I was wondering if your whole tab container was wrapped in an UpdatePanel, in which case the currect tab should stay focused... no issues with using both togeher.

See:http://forums.asp.net/p/1068120/1550723.aspx

Maybe it's been added in a more current release of the toolkit?

-Damien


Thanks, worked fine...
And thanks for the link to the other thread...

No comments:

Post a Comment