asp.net - How to fire ActiveTabChanged event of ajax:Tabcontainer conditionally -


i have ajax:tabcontainer on web form , have 2 tabpanel's in tabcontainer. need call server side methods when user clicks on second tabpanel. when user clicks on first tabpanel it'll noting , when user clicks on second tabpanel it'll fire server side code.

for tried use activetabchanged , onclientactivetabchanged.

server side code

void tabcontainer1_activetabchanged(object sender, eventargs e) {     //code goes here } 

javascript code

function firechangedevent(sender, e) {     if (sender.get_activetabindex() == 1) {         return false;     }     else {         return true;     } } 

but not working every time user clicks on tab it'll fire tabcontainer1_activetabchanged. can 1 guide me on how can fire event when need not every time when user clicks on tab?

if got correctly, can specifying tabindex asp:tabpanel.

<asp:tabpanel id="tab1" tabindex=1> <asp:tabpanel id="tab2" tabindex=2> 

then

void tabcontainer1_activetabchanged(object sender, eventargs e) {     if(tabcontainer.activetabindex == 2){     //code heretabcontainer } } 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -