Best Programming Practices for using TabStrip

3 posts, 0 answers
  1. Alan
    Alan avatar
    9 posts
    Member since:
    Mar 2009

    Posted 30 Dec 2009 Link to this post

    I am developing an ASP.NET application that has about 10 different main pages. I'd like to use a TabStrip on the main page with 10 tabs, one for each of the main pages I have. My question is, what is the programming practice for doing this? Do I put all my code into RadViews? By doing that, that would give me one really really big .ASPX file and probably be cumbersome to manage. Is there an alternate way to doing this that I am missing?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 31 Dec 2009 Link to this post

    Hello Alan,

    You can place UserControls with the required content in the RadPageViews rather than adding the controls/content directly into the RadPageView. Here is an example:

    aspx:
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" OnClientTabSelected="OnClientTabSelected" MultiPageID="RadMultiPage1"
      <Tabs> 
         <telerik:RadTab runat="server" Text="Root RadTab1" Selected="True"
         </telerik:RadTab> 
         <telerik:RadTab runat="server" Text="Root RadTab2"
         </telerik:RadTab> 
         ... 
       </Tabs> 
    </telerik:RadTabStrip> 
             
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" > 
       <telerik:RadPageView ID="RadPageView1" Selected="true" runat="server" >  
        RadPageView1 
            <uc1:UserControl1 ID="UserControl11" runat="server" /> 
       </telerik:RadPageView> 
       <telerik:RadPageView ID="RadPageView2"  runat="server"
        RadPageView2 
             <uc2:UserControl2 ID="UserControl21" runat="server" /> 
       </telerik:RadPageView> 
         .... 
    </telerik:RadMultiPage> 

    Happy New Year!
    Shinu.
  3. Christopher Bishop
    Christopher Bishop avatar
    50 posts
    Member since:
    May 2008

    Posted 03 Jan 2010 Link to this post

    Ack your overhead on that would be insane!

    If you want to use the radtabs for your main navigation then personally I would not use pageviews but rather use a iframe + splitter and use the client click function of the tabs to change your content.

    ie:
    <splitter>
    <pane>
    <tabs>
    </pane>
    <pane>
    <iframe>
    </pane>
    </splitter>

    You don't have to use a splitter but you get the general idea loading 10 pages worth of content up at the same time (regardless of using ajax) is going to be overkill expecially if 9 out of 10 times they are only use 3 primary tabs.

Back to Top