FinTagByUrl alwasy returns null

2 posts, 0 answers
  1. Gangleri
    Gangleri avatar
    18 posts
    Member since:
    Nov 2006

    Posted 01 Dec 2006 Link to this post


    I have a RadTabStrip defined as follows on a page:

    <radts:radtabstrip id="RadTabStrip1" runat="server">
          <radTS:Tab runat="server" Text="Page 1" NavigateUrl="Page1.aspx"></radTS:Tab>
          <radTS:Tab runat="server" Text="Page 2"       NavigateUrl="Page2.aspx"></radTS:Tab>

    However when I try to use the FindTabByUrl like so I always get null.


    Thanks for any help
  2. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 01 Dec 2006 Link to this post

    Hi Gangleri,

    That's by design. FindTabByUrl calls ResolveUrl to make the url application relative so Page1.aspx becomes something like /YourApp/Page1.aspx. In your case you can use "~" to denote the web application name:

    <radTS:Tab runat="server" Text="Page 1" NavigateUrl="~/Page1.aspx"></radTS:Tab>


    If this is not feasible you can enumerate the tabs and check their NavigateUrl property:
    foreach (Tab tab in RadTabStrip1.GetAllTabs())
        if (tab.NavigateUrl == "Page2.aspx")
    the telerik team
  3. DevCraft R3 2016 release webinar banner
Back to Top