Accessing tabstrip from different page

2 posts, 0 answers
  1. Venkatesh
    Venkatesh avatar
    88 posts
    Member since:
    Nov 2012

    Posted 22 Apr Link to this post


    I am using a web application, which does not have a master page. I have a header.ascx page, in which I have declared TabStrip. The tabstrip is displaying fine, but on selecting a page, the tab header color is not getting changed and also not showing sub tabs.

    I used the below code:


    <telerik:RadTabStrip ID="MyTab1" CausesValidation="false" SelectedIndex="0" runat="server"
                    Skin="Forest" EnableEmbeddedSkins="false" >
                        <telerik:RadTab runat="server" Text="Home" NavigateUrl="~/abc.aspx">

    In abc.aspx, I have referenced the header.ascx page, and I am trying to use the radtab as below in cs code:

    RadTabStrip menuStrip = (RadTabStrip).FindControl("RadTab");
              menuStrip.FindTabByValue("abc").Selected = true;

    How to refer the tab strip in subsequent pages?


  2. Ivan Danchev
    Ivan Danchev avatar
    788 posts

    Posted 27 Apr Link to this post

    Hello Venkatesh,

    If I understand your scenario correctly, you have the TabStrip in Header.ascx, you click on Tab "Home", abc.aspx is loaded and you are trying to access the TabStrip in Header.ascx. If that is the case you would not be able to access the TabStrip, because when navigating away from a page, in your case through clicking a Tab with NavigateUrl property set, the current page will unload and the new page will be loaded. These two pages have different and independent lifecycles.

    Ivan Danchev
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top