Response.Redirect for Page, not Window

3 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 15 Nov 2010 Link to this post


    I have a radwindow open.  I issue a Response.Redirect, but it navigates in the window.  I need to navigate in the whole page.  How can I do that when the rad window is open?  The request is obviously issued from the view within the radwindow?  All pages being viewed (master and in the radwindow) are within the application.

  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 16 Nov 2010 Link to this post

    Hello Brian,

    I don't see it being done using Response.Redirect. You need to return a client-script to do the redirection of the parent window. Something like this:

    function GetRadWindow() {
                    var oWindow = null;
                    if (window.radWindow) oWindow = window.radWindow;
                    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                    return oWindow;
                function RedirectParent() {
                    var oWnd = GetRadWindow();
                    oWnd.BrowserWindow.location = "Default.aspx";

    I hope that helps.
  3. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 17 Nov 2010 Link to this post

    Hi guys,

    Brian, Cory is right - when RadWindow displays a content page (e.g. NavigateUrl is set), the control uses a standard IFRAME and acts just like one. All functions (server or client ones) that you execute in that content page are executed in its context only. That is why Response.Redirect redirects the content page and not the parent one.
    To be able to redirect the parent page, you will have to use client-side approach like the one that Cory suggested. If you need to execute some server-side function first, I would suggest to execute it and then, at the end of that function, to output JavaScript that will run a function like the one Cory posted. See this blog post for more information on how to output JS from server.

    Georgi Tunev
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top