Question about ContentURL on multipage and tabstrip

2 posts, 0 answers
  1. Michael
    Michael avatar
    6 posts
    Member since:
    Oct 2012

    Posted 30 Oct 2012 Link to this post

    Hi , i am new to Telerik and web development. I have write a page that it contain a button, tabstrip and multipage. When the button click, it will dynamic create a new radtab and radpageview which contain contenturl. However, when i create the second tab and so on, the multipage will only show the radpageview that just created, the rest of the other tab become blank. For example: when i click the button,
    test.aspx page show on the radpageview. Then i click the button again,  test2.aspx page show, but test first tab which is test.aspx become blank. 

    Is there any way i can create the tab dynamically without losing the previous tab and the pageview content? thanks

    and here is my testing Code.

       protected void Button1_Click(object sender, EventArgs e)
                RadTab rootTab = new RadTab();
                rootTab.Text = TabStrip.Tabs.Count.ToString();
                rootTab.PageViewID = "RadPageView" + TabStrip.Tabs.Count.ToString();
                RadPageView newPageview = new RadPageView();
                newPageview.Width = new Unit("100%");
                newPageview.ID = "RadPageView" + TabStrip.Tabs.Count.ToString();
                newPageview.ContentUrl = "test" + TabStrip.Tabs.Count.ToString() + ".aspx";
  2. Nencho
    Nencho avatar
    1446 posts

    Posted 01 Nov 2012 Link to this post

    Hello Michael,

    Since you create the PageViews dynamically,  you should add the ContentUrl in the PageViewCreated event.
    I have prepared a sample project for you, in order to demonstrate you the correct implementation. Please find it attached.

    All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top