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

First Window Refresh a Second Window

3 Answers 90 Views
Window
This is a migrated thread and some comments may be shown as answers.
Bruno Roberto
Top achievements
Rank 1
Bruno Roberto asked on 11 Nov 2009, 11:25 AM

Hi,

I’m a beginner in “asp.net” and “telerik” and I need your help. How can I change page of “secondwindow” (secondpage.aspx) by pressing a button in the  firstwindow (firstpage.aspx)?

I would like to refresh "secondpage" to "thirdpage" by pressing a button in the "firstpage".

 

This is my code on the page default.

 

<form id="fDefault" runat="server">

 

<telerik:RadScriptManager ID="RadScriptManager" Runat="server">

</telerik:RadScriptManager>

<telerik:RadWindow ID="WinFirst" runat="server" NavigateUrl="firstpage.aspx">

</telerik:RadWindow>

               

<telerik:RadWindow ID="WinSecond" runat="server" NavigateUrl="secondpage.aspx">

</telerik:RadWindow>

</form>

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Nov 2009, 12:48 PM
Hi Bruno,

Here is the code that I tried in order to achieve same kind of scenario.

MainPage.aspx
 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
        <Windows> 
            <telerik:RadWindow NavigateUrl="win1.aspx" VisibleOnPageLoad="true" ID="Win1"
            </telerik:RadWindow> 
            <telerik:RadWindow NavigateUrl="win2.aspx" VisibleOnPageLoad="true" ID="Win2"
            </telerik:RadWindow> 
        </Windows> 
    </telerik:RadWindowManager> 

Win1.aspx (First page)
 
<input id="Button1" type="button" value="button" onclick="change();" />

<script type="text/javascript"
    function change() { 
        var manager = GetRadWindow().get_windowManager(); 
        var window2 = manager.getWindowByName("Win2"); 
        window2.setUrl('Win3.aspx'); 
    } 
    function GetRadWindow() { 
        var oWindow = null
        if (window.radWindow) 
            oWindow = window.radWindow; 
        else if (window.frameElement.radWindow) 
            oWindow = window.frameElement.radWindow; 
        return oWindow; 
    }   
</script> 

-Shinu.
0
Georgi Tunev
Telerik team
answered on 11 Nov 2009, 01:21 PM
Hi Bruno,

In addition to the code that Shinu provided (thank you, Shinu), I would suggest to examine this demo as well:
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx
It uses a logic similar to the one that you wish to implement.

Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Bruno Roberto
Top achievements
Rank 1
answered on 11 Nov 2009, 05:07 PM
Thanks for the help Shinu and Georgi.
Tags
Window
Asked by
Bruno Roberto
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Georgi Tunev
Telerik team
Bruno Roberto
Top achievements
Rank 1
Share this question
or