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

Radwinow + recognize

1 Answer 33 Views
Window
This is a migrated thread and some comments may be shown as answers.
Tomasz
Top achievements
Rank 1
Tomasz asked on 06 May 2011, 05:44 PM
Hi,

 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

Sort by
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:

function pageLoad()
{
     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.



Best wishes,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Window
Asked by
Tomasz
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or