0
kicks
Suppressing and Handling Errors from the Update Panel
Today, I was working on an application that required some Ajax magic. I had a very basic scenario set up in which I was simply inserting the database into the database using a simple form. I had some validation rules setup for my domain objects. If the validation rule was broken an exception was thrown and Global.asax Application_Error event caught the exception and uses Response.Write to write the exception on the screen. The problem occurred with the Response.Write method. Since, Response.Write simply writes the stream on the UI the UpdatePanel was getting messed up when rendering. If you want to try out this scenario take a look at the following code: