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

Differentiating radwindow from normal page in Error handling

1 Answer 69 Views
Window
This is a migrated thread and some comments may be shown as answers.
bo
Top achievements
Rank 1
bo asked on 10 Dec 2009, 05:48 PM
In the Application_Error event of my global.asax I log all untrapped errors and then redirect to an error page.  I need to know whether the page that threw the error is a rad window?  If it is I'll handle it differently. 
So in my case I have
Form1.aspx which does a javascript:window.radopen("popup.aspx", "Popup").  It's the Popup that throws the error.  How can I tell in the application_error event that this was thrown from a radopen?

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 11 Dec 2009, 12:14 PM
Hi bo,

I just answered your support ticket on the same subject. For convenience I am pasting my reply below:


RadWindow is based on an IFRAME and the IFRAME is a client object that displays a content page, different from the parent one. Because in IFRAME scenarios you cannot access main page from the content one on the server, the only way you could tell if the page is in a RadWindow or not is with client-side JavaScript code. For example you could check if the page is in an IFRAME, or as an alternative - to use the GetRadWindow() function to determine whether there is a RadWindow wrapper on that page (i.e. the page is in RadWindow).

In scenario like yours, I would suggest to keep a list in the Session with all pages that are displayed in RadWindow and to check whether the page that throws the error is in that list.



Kind 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.
Tags
Window
Asked by
bo
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or