i have tab container that contain 2 tab, one is profile view and another is profile edit
there is a hyperlink in menu bar, when user click profileview then a variable '1" is send in query string, when user click profileedit then variable '2' is send
my active tab index is '0' that is profileview
how to set focus on tabindex1 inside this function
if(request.querystring("a")==1)
{
.............
what should be the code to set focus on tabindex 2
You can set the TabPanel’s ActiveTabIndex property value with the corresponding TabPanel’s index, then, the TabIndex would be changed after your selection.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
Answer” if a marked post does not actually answer your question.
er.upinder
Member
6 Points
15 Posts
set active tab index from server side
Jun 09, 2010 02:16 PM|LINK
i have tab container that contain 2 tab, one is profile view and another is profile edit
there is a hyperlink in menu bar, when user click profileview then a variable '1" is send in query string, when user click profileedit then variable '2' is send
my active tab index is '0' that is profileview
how to set focus on tabindex1 inside this function
if(request.querystring("a")==1)
{
.............
what should be the code to set focus on tabindex 2
?????????????????
pls help i am beginner!!!!!!!!!!!!!!!
}
MetalAsp.Net
All-Star
112032 Points
18231 Posts
Moderator
Re: set active tab index from server side
Jun 09, 2010 03:19 PM|LINK
Both of these work for me:
TabContainer1.ActiveTab = tabTwo; // tabTwo is the id of the tab
OR
TabContainer1.ActiveTabIndex = 1; // zero based index.
er.upinder
Member
6 Points
15 Posts
Re: set active tab index from server side
Jun 09, 2010 04:27 PM|LINK
i tried both but not working
i see another strange this, the tab which is open in visual studio, become the active tab
then how can i check my active tab working or not??
Zhi-Qiang Ni...
All-Star
33491 Points
2952 Posts
Microsoft
Re: set active tab index from server side
Jun 16, 2010 10:00 AM|LINK
Hi er.upinder,
You can set the TabPanel’s ActiveTabIndex property value with the corresponding TabPanel’s index, then, the TabIndex would be changed after your selection.
Refer to these threads:
http://forums.asp.net/p/1485812/3487084.aspx#3487084
http://forums.asp.net/p/1480067/3461595.aspx#3461595
http://forums.asp.net/p/1470362/3413133.aspx#3413133
http://forums.asp.net/p/1489582/3506133.aspx#3506133 .
Best regards,
Zhi-Qiang Ni
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
Answer” if a marked post does not actually answer your question.