This is a migrated thread and some comments may be shown as answers.

FindTabByUrl and Session

1 Answer 81 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
robertw102
Top achievements
Rank 1
robertw102 asked on 23 Oct 2009, 07:54 PM
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.

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 29 Oct 2009, 09:56 AM
Hello,

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.SelectParents();
        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.
Tags
TabStrip
Asked by
robertw102
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or