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

Error Handling in OnError()

0 Answers 147 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Piyush Bhatt
Top achievements
Rank 2
Piyush Bhatt asked on 16 May 2008, 03:15 PM
I have following in Master Page.
ScriptManager1_AsyncPostBackError()
and following in BasePage.
 OnError().

In OnError() I get Server.GetLastError(). Now, I want to display the message as javascript alert() or radalert() from OnError and do the Server.ClearError(). - first of all is it good idea?

Next, whatever message I set to AsyncPostBackErrorMessage  - as per documents - it is sent to browser. But then what happens to it? How can I get it on the client side and display it?
radScriptManager1.AsyncPostBackErrorMessage = exception.message

Will Page.OnError() be called in case of AsyncError?

Is it first of all good idea to display all errors back to user as alert() box?
-Piyush

No answers yet. Maybe you can help?

Tags
Ajax
Asked by
Piyush Bhatt
Top achievements
Rank 2
Share this question
or