Tabs Based on Date Passed in QueryString

2 posts, 0 answers
  1. Matt
    Matt avatar
    2 posts
    Member since:
    Nov 2010

    Posted 23 Nov 2011 Link to this post

    I'm interested in building a tab strip that will dynamically change based on a value passed in a querystring, such as a date.
    The current date will be highlighted in the tab and multiple days on either side of the center tab will show.
    I've attached a screen shot of what I'd like to do and I didn't know if there's a similar example out there.

    Thanks,
    Matt
  2. Matt
    Matt avatar
    2 posts
    Member since:
    Nov 2010

    Posted 25 Nov 2011 Link to this post

    No need to reply to this.  I was able to come up with something.  
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Outlook">
        </telerik:RadTabStrip>
    System.DateTime StartDate = Convert.ToDateTime(Request.QueryString["StartDate"]);
                    for (int i = -5; i < 6; i++)
                    {
                        RadTab rootTab = new RadTab();
                        RadTabStrip1.Tabs.Add(rootTab);
                        rootTab.Text = String.Format("{0:MMM}", StartDate.AddDays(i)).ToString() +"<BR /><strong>"
                            +String.Format("{0:dd}", StartDate.AddDays(i)).ToString()+"</strong><BR/ >"
                            +String.Format("{0:ddd}", StartDate.AddDays(i)).ToString();
                    }
                RadTabStrip1.SelectedIndex = 5;
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top