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

Close window and redirect mainpage

1 Answer 138 Views
Window
This is a migrated thread and some comments may be shown as answers.
Guenni
Top achievements
Rank 1
Guenni asked on 27 Oct 2008, 09:50 PM
Hello Team,

I have a button inside a RadWindow and I'd like onclick for the RadWindow to close and the mainpage to redirect to another page. Can i achieve this?
This is what I have: 
(Codebehind Radwindow)
protected void btn_NavigateGoogle_Click(object sender, EventArgs e)  
    {  
        InjectScriptLabel.Text = "<script>CloseAndNavigate()</" + "script>";  
    } 
(.ASPX file Radwindow)
  <script type="text/javascript">    
    
            function CloseAndNavigate()  
            {  
                GetRadWindow().close();   
                window.location = Http://www.google.com;           
            }  
      </script> 

<

asp:Button ID="btn_NavigateGoogle" runat="server"

 

 

Text="Close Me" onclick="btn_NavigateGoogle_Click" />

 

<

asp:Label ID="InjectScriptLabel" runat="server" Visible="true"></asp:Label>

 

De window does close onbuttonclick, but it wont redirect.
Any suggestions? I'd appreciate your help

~Guen~

1 Answer, 1 is accepted

Sort by
0
Guenni
Top achievements
Rank 1
answered on 27 Oct 2008, 10:08 PM
Sorry to bother, Got the solution!

GetRadWindow().BrowserWindow.location.href = url;

~Guen~

Tags
Window
Asked by
Guenni
Top achievements
Rank 1
Answers by
Guenni
Top achievements
Rank 1
Share this question
or