title: RadTabStrip appears to have no RadTab selected - Why?
body: <p>Does a RadTabStrip work in a MasterPage? The tabs do not appear selected when clicked.</p>
  
  <p><strong>Steps:</strong> </p>
  
  <ol>
  <li><p>Create a new Web Application Project. By default it contains Home and About tabs inside a Master Page (Site.Master). The tabs are asp:MenuItem controls. </p></li>
  <li><p>Comment out the asp:Menu control and drag a RadTabStrip in its place. Add two RadTabs. When you run the application each tab works as expected -- it appears to be selected when clicked.</p></li>
  <li><p>Now add NavigateUrls to each RadTab pointing to the "~Default.aspx" and "~About.aspx" pages. When the application runs the tabs don't appear to be selected when clicked (although the correct page displays).</p>
  
  <p><strong>What's going on? How can I make this work?</strong></p></li>
  </ol>
  
  <p>Update: Here's how I altered the default code in Site.Master...</p>
  
  <pre><code>&lt;div&gt;
      &lt;telerik:RadScriptManager ID="RadScriptManager1" runat="server"&gt;
      &lt;/telerik:RadScriptManager&gt;
  &lt;/div&gt;
  
          &lt;%--&lt;div class="clear hideSkiplink"&gt;
              &lt;asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"&gt;
                  &lt;Items&gt;
                      &lt;asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/&gt;
                      &lt;asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/&gt;
                  &lt;/Items&gt;
              &lt;/asp:Menu&gt;
          &lt;/div&gt;--%&gt;
  
      &lt;div&gt;
          &lt;telerik:RadTabStrip ID="RadTabStrip1" runat="server"&gt;
              &lt;Tabs&gt;
                  &lt;telerik:RadTab runat="server" Text="Root RadTab1" NavigateUrl="~/Default.aspx"&gt;
                  &lt;/telerik:RadTab&gt;
                  &lt;telerik:RadTab runat="server" Text="Root RadTab2" NavigateUrl="~/About.aspx" &gt;
                  &lt;/telerik:RadTab&gt;
              &lt;/Tabs&gt;
          &lt;/telerik:RadTabStrip&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p><strong>The answer...</strong></p>
  
  <p><a href="https://stackoverflow.com/users/351982/bojan-skrchevski">Bojan Skrchevski's</a> answer <a href="http://www.telerik.com/community/forums/aspnet-ajax/tabstrip/selected-tab-not-highlighted.aspx" rel="nofollow noreferrer">led me to this</a>. I added this code to the Master Page's Page_Load event and it works:</p>
  
  <pre><code>using Telerik.Web.UI;
  
  namespace WebApplication1
  {
      public partial class SiteMaster : System.Web.UI.MasterPage
      {
          protected void Page_Load(object sender, EventArgs e)
          {
              RadTab currentTab = RadTabStrip1.FindTabByUrl(Request.Url.PathAndQuery);
              if (currentTab != null) currentTab.Selected = true;
          }
      }
  }
  </code></pre>