Close Radwindow and refresh parent page

2 posts, 0 answers
  1. bharat kumar
    bharat kumar avatar
    53 posts
    Member since:
    Jan 2010

    Posted 06 Sep 2010 Link to this post


    Hi,

    when session expires and user click on link to open popwindow then the login page opens in popup window.
    so my requirement is i need to close the popup window and refresh the parent page so that user redirect to login page from main window instead of opening login page in popup window.

    i am writing following code in popup window master page prerender event but its not working....

     if (principal == null)
            {
                string script1 = "<script language=JavaScript>";
                script1 += "alert('The session has expired due to longer idle time in application. You will be redirected to the homepage');";
                script1 += "opener.location.reload(true);";
                script1 += "opener.focus();";
                script1 += "self.close();";
                script1 += "</script>";      

                ScriptManager.RegisterStartupScript(this, this.GetType(), "CLOSE", script1, true);

            }

    please help.

    waiting for your reply.



  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Sep 2010 Link to this post

    Hello,


    Get the client object of RadWindow and use the close() method to close the window as shown in the documentation.

    Here are the most important RadWindow methods that might helpful for you.
    RadWindowManager Methods
    RadWindow Methods

    Executing JavaScript function from server-side code

    -Shinu.
Back to Top