简体   繁体   中英

ASP.NET: Active Tab container not changing

I have 3 tabpanel.

TabPanel1 TabPanel2 TabPanel3

with Panel and UpdatePanel inside of it. My problem is, its not displaying the TabPanel2 and TabPanel3 every 10sec instead TabPanel1 only. I also have a timer for the whole page.

Here's my codebehind:

 protected void Page_Load(object sender, EventArgs e)
        {
            if (FGSQL._countTime >= 3)
                FGSQL._countTime = 0;

            TabContainer1.ActiveTab = TabContainer1.Tabs[FGSQL._countTime];


            if (!Page.IsPostBack)
            {
                loadRecord("");
                loadTickets();
                loadServiceUnit();

            }

        }


 protected void Timer1_Tick(object sender, EventArgs e)
        {
            loadRecord("");
            loadTickets();
            loadServiceUnit();

            FGSQL._countTime++;

        }

thanks!

I already solve it!.

I just put this code in timer1_tick

Page.Response.Redirect(HttpContext.Current.Request.Url.ToString(), true);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM