I got a question, is there any way to recognize inside the page_load event, that the page is at the moment in rad window or not ?.
Regards,
Tomek
1 Answer, 1 is accepted
0
Marin Bratanov
Telerik team
answered on 11 May 2011, 11:14 AM
Hi Tomek,
You cannot determine whether the page is loaded inside a RadWindow on the server. You can do that on the client with only a few lines of JavaScript, though:
functionpageLoad()
{
if(window != window.top) alert("page is inside an iFrame");
}
After that you could pass this information to the server (through a hidden field, for example).
Note that this is actually an approach that determines whether the page is loaded inside an iframe (which is what the RadWindow uses).
If you can determine whether your page has been loaded inside an iframe on the server without client-side code you can use the same approach to check if it is inside the RadWindow.