I have an ASP.NET AJAX page with several UpdatePanels. If error occured during asyncronous postback, I want to ignore it for some panels and show errors for other updatepanels. The samples that I found(like Customizing Error Handling for ASP.NET UpdatePanel Controls.) suggested to call add_endRequest and from EndRequestEventArgs use error Property .
My question on forum is how can I find which of UpdatePanels caused the particular Request in EndRequestHandler?
1. Get which UpdatePanel is updating at the server side. Check these links:
Gets a value that indicates whether the UpdatePanel control is being updated as a result of an asynchronous postback.
The UpdatePanel control is being updated as a result of an asynchronous postback.property is intended for use by control developers who want to know when an
2. use try… catch to catch errors, and in catch block, create an new exception which contain information of which updatepanel is updating and throw it.
3. check the information in the error at the client side, process the error based on the information