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

Ajax error handling

5 Answers 321 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Piyush Bhatt
Top achievements
Rank 2
Piyush Bhatt asked on 27 Feb 2008, 03:46 PM
 Rad controls when get some errors (like datasource is null or session expired etc) - where do they throw? How do I catch errors thrown by Rad Controls and do some processing?

Specially if I am using a AjaxManager in a page and session expires on the server - how do I refresh the whole page and redirect to Login or some other page?

Thanks,
Piyush

5 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 28 Feb 2008, 01:34 PM
Hi Piyush,

Please refer to this article, as well as this one , which describe custom exceptions handling and redirection to another page.
I hope these resources help.

Greetings,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Piyush Bhatt
Top achievements
Rank 2
answered on 28 Feb 2008, 03:25 PM
Sure! this helps to know more about the error handling in Rad Ajax.

As you know in .Net Page_Error and Application_Error get called whenever there is error. And I put the error message in a log file using these methods. But when Rad Ajax errors occur - these events don't seem to get called. And in that case, how do I log to the log file?

-Piyush
0
Iana Tsolova
Telerik team
answered on 29 Feb 2008, 05:24 PM
Hi Piyush,

Please have a look at the resources mentioned by my colleagues so far. You can implement the OnAjaxRequestError event as described log the errors from there.

Greetings,
Iana
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Piyush Bhatt
Top achievements
Rank 2
answered on 07 Mar 2008, 08:24 PM
I do not find OnAjaxRequestError event on the server/client side for AjaxPanel control. I need to have this on the server side and I am using AjaxPanel - let me know how catch errors using this method.

-Piyush
0
Iana Tsolova
Telerik team
answered on 10 Mar 2008, 02:24 PM
Hi Piyush,

You can use the AsyncPostBackError event of the ScriptManager for this purpose. Please, find more details here.

Kind regards,
Iana
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Piyush Bhatt
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Piyush Bhatt
Top achievements
Rank 2
Iana Tsolova
Telerik team
Share this question
or