This is a migrated thread and some comments may be shown as answers.

Load Different .aspx in different category Tab

2 Answers 67 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 04 Oct 2012, 02:31 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 Oct 2012, 04:39 AM
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.
0
Charles
Top achievements
Rank 1
answered on 15 Oct 2012, 02:00 PM
Thanks Princy, I'll have a look at this once I get back on working with my tabs. Cheers!
Tags
TabStrip
Asked by
Charles
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Charles
Top achievements
Rank 1
Share this question
or