views:

1442

answers:

1

i have a < ajaxToolkit:TabPanel initially when the page loads, the first tab is "open" ("focused on")

can i do something (preferably server side) so my second tab would be the "default" selected tab?

+1  A: 

Set the TabPanel's ActiveTabIndex to 1 in your Page.Load handler:

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
        TabPanel1.ActiveTabIndex = 1;
}

You can also set it in the markup: <aspToolkit:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="1">...</aspToolkit:TabPanel>

technophile