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

Redirect from TabStrip

8 Answers 357 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 06 Jul 2011, 07:05 PM
In server-side how can I Redirect AWAY from a RadMultiPage with RadTabStrip to a different aspx page ?

8 Answers, 1 is accepted

Sort by
1
Shinu
Top achievements
Rank 2
answered on 07 Jul 2011, 08:22 AM
Hello Steve,

You can directly set the NavigateUrl property which cause the tab to automatically launch another Web page (specified by NavigateUrl) in the window specified by Target. If the Target property is not set, the new Web page uses the current browser window. .

aspx:
<Tabs>
    <telerik:RadTab runat="server" Text="Tab1" NavigateUrl="Content url.asx" Target="_blank">
    </telerik:RadTab>
    <telerik:RadTab runat="server" Text="Tab2">
    </telerik:RadTab>
. . . . . . . . . .

Thanks,
Shinu.
0
Steve
Top achievements
Rank 1
answered on 07 Jul 2011, 01:21 PM
Thanks, but that's not exactly the situation I have. 

From one of the tabs I have a code-behind button click event to navigate to a different non-tabbed page on the same browser.

Here's an example of the aspx page that defines three tabs:

    <telerik:RadTabStrip ID="RadTabStrip1" runat="server"
        MultiPageID="RadMultiPage1" SelectedIndex="0">
        <Tabs>
            <telerik:RadTab runat="server" Text="Tab 1" Owner="RadTabStrip1" Selected="True" ></telerik:RadTab>
            <telerik:RadTab runat="server" Text="Tab 2"></telerik:RadTab>
            <telerik:RadTab runat="server" Text="Tab 3"></telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Height="800px" EnableEmbeddedScripts="true">
        <telerik:RadPageView ID="RadPageViewTabDetails1" runat="server"
            ContentUrl="~/Application/TabDetails1.aspx"></telerik:RadPageView>
        <telerik:RadPageView ID="RadPageViewTabDetails2" runat="server"
            ContentUrl="~/Application/TabDetails2.aspx"></telerik:RadPageView>
        <telerik:RadPageView ID="RadPageViewTabDetails3" runat="server" 
            ContentUrl="~/Application/TabDetails3.aspx"></telerik:RadPageView>
    </telerik:RadMultiPage> 


Then in the code-behind on one of the tabbed pages ... e.g. TabDetails3.aspx.cs  ... there is a button-click code like this:

            protected void btnNavigateElsewhere_Click(object sender, EventArgs e)
            {
                Response.Redirect("~/Application/NonTabbedPage.aspx?reqNum=" + ReqId.ToString());
            }

Currently the redirected page displays on the current tab replacing the old tabbed page content .. and leaving all the others tabs in the display.  I need the action to navigate away from the tabs altogether but stay in the same browser and session.

Thanks
0
Kate
Telerik team
answered on 12 Jul 2011, 12:28 PM
Hi Steve,

I am not quite sure if you need to navigate away from the page with the tabs by using a tab click or by using simple button click. In case you need to use a tab click here I pasted the markup code that works just fine with me and it navigates away from the page containg the tabs when I click on Root RadTab2 tab:
<telerik:RadTabStrip runat="server" ID="RadTabStrip1" Skin="Simple" SelectedIndex="0">
            <Tabs>
                <telerik:RadTab runat="server" Text="Root RadTab1" SelectedIndex="0">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Root RadTab2"  NavigateUrl="ComboBox.aspx">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Root RadTab3">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Root RadTab4">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Root RadTab5">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Root RadTab6">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Root RadTab7">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Root RadTab8">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server"  SelectedIndex="1">
            <telerik:RadPageView ID="RadPageView1" runat="server" ContentUrl="ComboBox.aspx">
                RadPageView</telerik:RadPageView>
            <telerik:RadPageView ID="RadPageView2" runat="server" ContentUrl="ComboBoxcheckBox.aspx">
                RadPageView2
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageView3" runat="server" ContentUrl="ComboBoxTreeView.aspx">
                RadPageView3
            </telerik:RadPageView>
                    </telerik:RadMultiPage>

If, however, it refers to the other case I would suggest that you take a look at the following post.

Regards,
Kate
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
deepak
Top achievements
Rank 1
answered on 12 Oct 2011, 01:55 PM
hi ,
I have the same problem as Steve.
When i am inside a tab and then i want to redirect to some other page outside the tabbed pages, the requested page opens up as a tab.
The exact situation is as following:
When a user opens up a tab and then session expires. The master page redirects the user to the login page.But the login page opens as a tab and not an independant web page.
Basically how do i navigate out of the tabbed pages on some event say a button click on the tab.


Regards,
Deepak


0
Kate
Telerik team
answered on 17 Oct 2011, 10:40 AM
Hi Deepak,

In general when you are using the NavigateUrl property of the RadTabStrip the page that you navigate to will load in the current page. However, if you need to open the url in a new window, as I understand your scenario, you could use OnClientTabSelecting event  in a combination with our RadWindow or a simple browser popup as described in this demo.

Regards,
Kate
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
0
Geoff
Top achievements
Rank 1
answered on 19 Mar 2015, 04:37 PM
Just found this rather old post which describes my issue exactly.

I have a page which has on it a tab strip with multi page, I would like to be able to navigate away from one of the pages in the tabs with a button click but calling a response. redirect from any of the tabs loads the new pages in that tab?

Is there some was to do this that I have missed as it must be a common scenario.

Geoff
0
Ivan Danchev
Telerik team
answered on 24 Mar 2015, 09:49 AM
Hello Geoff,

If you are calling Response.Redirect() on button click like this:
protected void Button1_Click(object sender, EventArgs e)
{
    Response.Redirect("http://www.google.com");
}

You can subscribe to the button's OnClientClick and add the following in its event handler:
function OnClientClicked(sender, eventArgs) {
    document.forms[0].target = '_blank';
}

<telerik:RadButton runat="server" ID="Button1" Text="Redirect" OnClientClicked="OnClientClicked" OnClick="Button1_Click" />

This would make the browser open a new tab, instead of loading the page in the current one.

Regards,
Ivan Danchev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Geoff
Top achievements
Rank 1
answered on 24 Mar 2015, 12:03 PM
Thanks Ivan,

I have sorted this now.

Geoff
Tags
TabStrip
Asked by
Steve
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Steve
Top achievements
Rank 1
Kate
Telerik team
deepak
Top achievements
Rank 1
Geoff
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or