I have a 2 tabpanels in my tabcontainer and both the panel has their own header text. I have put the tabcontainer inside a table.
Above the table (OR tabcontainer) I have a label and what I am trying to do is ... changing the label text as per tab selection ... code below:
if(tabcontainer.activetabindex == 0)
{
label1.text = tabpanel1.headertext;
}
else {label1.text = tabpanel2.headertext;}
But this is not working ... even if I select the panel2 my label displays the same text as panel1 header text ... it's not changing as I want.
Am I doing anything wrong? Please help.
Thanks, Rahul
TabContainer changes active panel without postback, so your code doesn't fire.
You have to create javascript code and call it on tabchange in browser.