function RefreshUpdPanels() { var index = $find('TabContainer1').get_activeTabIndex(); if (index == 0) { __doPostBack('UpdatePanel1', ''); } else if (index == 1) { __doPostBack('UpdatePanel2', ''); } }
And it doesn't work T_T When I click on the 2nd tab, I think a "postback" is realized and It turn back to the tab1. How to do a "loading" like in this forum (with a "loading..." animation, etc...)
MeTaLCaM
Member
2 Points
10 Posts
To do tabs, exactly like in this forum
Jun 05, 2009 02:58 PM|LINK
Hi everyone.
I actually try to understand how Ajax Tookit Tabs control works.
In one of my tab, I will load a lot of pictures, and I guess that if I put all the pics directly in a TabPanel, it will load all the pics at start.
What I would, is to load the pics ONLY when I click on the tabs called "Pictures".
I've looked a while for doing this, bug It still not working.
My aspx page is :
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" OnClientActiveTabChanged="clientActiveTabChanged"> <cc1:TabPanel HeaderText="tab1" runat="server"> <ContentTemplate> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> yeah ? </ContentTemplate> </asp:UpdatePanel> </ContentTemplate> </cc1:TabPanel> <cc1:TabPanel HeaderText="tab2" runat="server"> <ContentTemplate> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">> <ContentTemplate> Photos... </ContentTemplate> </asp:UpdatePanel> </ContentTemplate> </cc1:TabPanel> </cc1:TabContainer>I find a Javascript source to do that :
function RefreshUpdPanels() {var index = $find('TabContainer1').get_activeTabIndex();
if (index == 0) {
__doPostBack('UpdatePanel1', '');
} else if (index == 1) {
__doPostBack('UpdatePanel2', '');
}
}
ajax Postback tab container