Load Different .aspx in different category Tab

3 posts, 1 answers
  1. Charles
    Charles avatar
    3 posts
    Member since:
    Oct 2012

    Posted 04 Oct 2012 Link to this post

    Is there anyone who knows how to do this. I have a navigation menu and I want to load the links in their respective category tabs. ie. report.aspx goes to Report tab and parameter.aspx goes to Parameter tab. I've tried doing it with the radsplitter and radpane but for some reason the width and height of the page gets resized down even when set to 100%.

    Here's what i'm trying to do. 
    <telerik:RadTabStrip runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0"
                                ID="radstrip1">
                                <Tabs>
                                    <telerik:RadTab runat="server" Text="Reports" Selected="true">
                                    </telerik:RadTab>
                                    <telerik:RadTab runat="server" Text="Parameters">
                                    </telerik:RadTab>
                                </Tabs>
                            </telerik:RadTabStrip>
                            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Height="100%"
                                Width="100%">
                                <telerik:RadPageView ID="pageview1" runat="server" Width="100%" Height="100%">
                                    <telerik:RadSplitter ID="radSplitter1" runat="server" Width="100%" Height="100%">
                                        <telerik:RadPane runat="server" ID="radpane1" ContentUrl="Blank.aspx" Scrolling="None">
                                        </telerik:RadPane>
                                    </telerik:RadSplitter>
                                </telerik:RadPageView>
                                <telerik:RadPageView ID="pageview2" runat="server" Width="100%" Height="100%">
                                    <telerik:RadSplitter ID="radSplitter2" runat="server" Width="100%" Height="100%">
                                        <telerik:RadPane runat="server" ID="radpane2" ContentUrl="Blank.aspx" Scrolling="None">
                                        </telerik:RadPane>
                                    </telerik:RadSplitter>
                                </telerik:RadPageView>
                            </telerik:RadMultiPage>

    Code Behind goes something like this..
    If link.Report Then
    target ="radpane1"
    ElseIf link.ParmSelect Then
    target="radpane2"

    Greatly appreciated if anyone could help :)
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Oct 2012 Link to this post

    Hi Charles,

    You can use an iframe control and load the different pages through code-behind on TabClick event. Also you can save the Url for each tab in a custom attribute. Here's the sample code:

    ASPX:
    <telerik:RadTabStrip runat="server" SelectedIndex="0" OnTabClick="radTabMain_TabClick" ID="radstrip1">
       <Tabs>
           <telerik:RadTab runat="server" Text="Reports" Selected="true" Url="Reports.aspx">
           </telerik:RadTab>
           <telerik:RadTab runat="server" Text="Parameters" url="Parameters.aspx">
           </telerik:RadTab>
       </Tabs>
    </telerik:RadTabStrip>
    <iframe id="frame1" width="100%" height="300" runat="server">
    </iframe>

    C#:
    protected void Page_Load(object sender, EventArgs e)
        {
            frame1.Attributes["src"] = "Reports.aspx";
        }
    protected void radTabMain_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e)
        {
            frame1.Attributes["src"] = e.Tab.Attributes["Url"];
        }

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Charles
    Charles avatar
    3 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2012 Link to this post

    Thanks Princy, I'll have a look at this once I get back on working with my tabs. Cheers!
Back to Top