FindTabByUrl and Session

2 posts, 1 answers
  1. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 23 Oct 2009 Link to this post

    I've noticed that the RadTabStrip FindTabByUrl method does not find the tab if the session id exists in the page url. If the session is removed from the page url, the tab with the corresponding url is found and can then be selected. The session state mode I have is set to AutoDetect, so this would only happen if the user has cookies disabled, but I want the experience to be the same regardless.

    Is this bug with RadTabStrip or is their a way for me to avoid this situation from occurring, other than using cookie-only sessions, which is something I don't want to do.

  2. Answer
    T. Tsonev
    T. Tsonev avatar
    2815 posts

    Posted 29 Oct 2009 Link to this post


    Thank you for reporting this issue. The demo indeed doesn't work with Cookieless session. The code must be modified a bit to accommodate this scenario:

    protected void Page_Load(object sender, System.EventArgs e)
        // ApplyAppPathModifier will add the session ID if we're using Cookieless session.
        string urlWithSessionID = Response.ApplyAppPathModifier(Request.Url.PathAndQuery);
        RadTab tab = RadTabStrip1.FindTabByUrl(urlWithSessionID);
        if (tab != null)
            tab.PageView.Selected = true;

    This will work both with cookies and without. We'll update the demo as well.

    As a token of our gratitude for your involvement, your Telerik points have been updated.

    All the best,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top