I have created a user control “Mycontrol.ascx”.
In that ascx file I have a rad window with navigate url as “windowPage.aspx”
in “windowPage.aspx” I have an asp button that button do some server side tasks on clicking well.
I am closing the window using onClientClose() well.
But after performing the serve side actions ,
(Now the window is closed using onClientClose() )
My browser should be redirected to “default.aspx”
“NB:I have used Mycontrol.ascx in default.aspx”
5 Answers, 1 is accepted
0
Hello PureRamu,
Try using in the onClientClose() function (that as I understand is placed in your window.Page.aspx)
GetRadWindow().BrowserWindow.location.href = "http://mysite.com/default.aspx";
OR
top.location.href = "http://mysite.com/default.aspx";
if default.aspx is displayed as a topmost page.
Best wishes,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Try using in the onClientClose() function (that as I understand is placed in your window.Page.aspx)
GetRadWindow().BrowserWindow.location.href = "http://mysite.com/default.aspx";
OR
top.location.href = "http://mysite.com/default.aspx";
if default.aspx is displayed as a topmost page.
Best wishes,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
PureRamu
Top achievements
Rank 1
answered on 15 May 2009, 06:23 AM
This is greate replay. it works
but i am fasing 2 problems here.
1)When i redirected using top.location.href = "http://mysite.com/default.aspx";
I can see "default.aspx" with the rad window opened sate.
i dont want this :(
2) I want the the server side automatic events of "default.aspx" to be rased on this redirection.
it it possible?
but i am fasing 2 problems here.
1)When i redirected using top.location.href = "http://mysite.com/default.aspx";
I can see "default.aspx" with the rad window opened sate.
i dont want this :(
2) I want the the server side automatic events of "default.aspx" to be rased on this redirection.
it it possible?
0
PureRamu
Top achievements
Rank 1
answered on 15 May 2009, 06:25 AM
This is great replay. it works
but i am faceing 2 problems here.
1)When i redirected using top.location.href = "http://mysite.com/default.aspx";
I can see "default.aspx" with the rad window opened sate.
i dont want this :(
2) I want the the server side automatic events of "default.aspx" (init ,load etc...) to be rased on this redirection.
is it possible?
but i am faceing 2 problems here.
1)When i redirected using top.location.href = "http://mysite.com/default.aspx";
I can see "default.aspx" with the rad window opened sate.
i dont want this :(
2) I want the the server side automatic events of "default.aspx" (init ,load etc...) to be rased on this redirection.
is it possible?
0
PureRamu
Top achievements
Rank 1
answered on 15 May 2009, 09:06 AM
in “windowPage.aspx” i have 2 buttons.
one button is to close the window, on closing i just want to close the window ,no serverside events to be raised.it should not cause a post back.
Second button is to do some serverside activity. after doing the serverside activity it should be redirected to “default.aspx” .
this redirection should evocke/fire/trigger/raise automatic event s in the "default.aspx "
one button is to close the window, on closing i just want to close the window ,no serverside events to be raised.it should not cause a post back.
Second button is to do some serverside activity. after doing the serverside activity it should be redirected to “default.aspx” .
this redirection should evocke/fire/trigger/raise automatic event s in the "default.aspx "
0
Hi PureRamu,
For the first task, you need to have the GetRadWindow() function declared on the content page so you could get a reference to the RadWindow and call its close() method.
e.g.
As for the second task, I am not quite sure what exactly you want to achieve, but I believe it is not directly related to the RadWindow control. Please implement the desired logic by using a standard browser popup (window.open()) and send me the working project in a support ticket. I will check it and rework it for you so it uses RadWindow.
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
For the first task, you need to have the GetRadWindow() function declared on the content page so you could get a reference to the RadWindow and call its close() method.
e.g.
<script type="text/javascript"> |
//Use the GetRadWindow function to get a reference to the RadWindow wrapper |
function GetRadWindow() |
{ |
var oWindow = null; |
if (window.radWindow) |
oWindow = window.radWindow; |
else if (window.frameElement.radWindow) |
oWindow = window.frameElement.radWindow; |
return oWindow; |
} |
function closeWin() |
{ |
var oWnd = GetRadWindow(); |
oWnd.close(); |
} |
</script> |
<asp:Button |
ID="Button1" |
runat="server" |
OnClientClick="closeWin(); return false;" |
Text="Close RadWindow" /> |
As for the second task, I am not quite sure what exactly you want to achieve, but I believe it is not directly related to the RadWindow control. Please implement the desired logic by using a standard browser popup (window.open()) and send me the working project in a support ticket. I will check it and rework it for you so it uses RadWindow.
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.