Dynamic Tab strip creation

2 posts, 0 answers
  1. Taran
    Taran avatar
    20 posts
    Member since:
    Jan 2009

    Posted 27 Mar 2009 Link to this post

    Hi,

    I want to create Tab Strip dynamically in asp.net application with following feature:
    On each tab click i want to open new aspx page.

    Regards
    Amit Sharma
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 30 Mar 2009 Link to this post

    Hello Amit,

    If you want to open a new page on clicking a tab, then you would have to set the NavigateUrl property of the corresponding tab. Check out the code below which implements the same:
    c#:
    protected void Page_Load(object sender, EventArgs e)  
        {  
            RadTabStrip tabstrip = new RadTabStrip();  
            tabstrip.ID = "TabStrip1";  
            RadTab tab1 = new RadTab();         
            tab1.NavigateUrl = "Default2.aspx";  
            tab1.Text = "Page1";  
            RadTab tab2 = new RadTab();         
            tab2.NavigateUrl = "Default3.aspx";  
            tab2.Text = "Page2";  
            RadTab tab3 = new RadTab();         
            tab3.NavigateUrl = "Default4.aspx";  
            tab3.Text = "Page3";  
            tabstrip.Tabs.Add(tab1);  
            tabstrip.Tabs.Add(tab2);  
            tabstrip.Tabs.Add(tab3);  
            Page.Controls.Add(tabstrip);  
        }  

    Thanks
    Princy.
Back to Top