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

Close Radwindow and refresh parent page

1 Answer 284 Views
Window
This is a migrated thread and some comments may be shown as answers.
bharat kumar
Top achievements
Rank 1
bharat kumar asked on 06 Sep 2010, 06:11 PM

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.



1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Sep 2010, 06:41 AM
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.
Tags
Window
Asked by
bharat kumar
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or