0

Is it possible to open tabs of Ajax Tab Container using query string.

Something like when the query string is

localhost:81/dashboard.aspx?tab=0
localhost:81/dashboard.aspx?tab=1
localhost:81/dashboard.aspx?tab=3

My Code is

<ajax:TabContainer ID="TabContainer2" runat="server" CssClass="MyTabStyle">
                            <ajax:TabPanel ID="TabPanel2" runat="server" TabIndex="0">
                                <headertemplate>
                                   Overview
                                  </headertemplate>
                                <contenttemplate>                         
                             </contenttemplate>
                            </ajax:TabPanel>
                            <ajax:TabPanel ID="tbpnluser1" runat="server" TabIndex="1">
                                <headertemplate>
                                   Overview
                                </headertemplate>
                                <contenttemplate>                        
                           </contenttemplate>
                            </ajax:TabPanel>
                        </ajax:TabContainer>

Please help

Gitz
  • 810
  • 1
  • 17
  • 48
  • Set ActiveTabIndex property of the tab container based on your querystring. – shrekDeep Nov 06 '14 at 10:49
  • Check here: http://stackoverflow.com/questions/811657/setting-active-tab-in-asp-net-ajax-tabcontainer-causes-entire-container-to-disap – shrekDeep Nov 06 '14 at 10:51

1 Answers1

0

YES there is property called ActiveTabIndex

by using it you can show the tab you want in server-side

in server-side

 protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
       if(Request.QuerryString["tab"]==1)
              {

                tabcantainerID.ActiveTabIndex =1
             }
    .....
                 }
              }

hope this will help you

dazzling kumar
  • 584
  • 1
  • 8
  • 17