<%@ Application Language="C#" %>
<script Runat="server">
protected void Application_Error( object src, EventArgs args ) {
HttpUnhandledException eHttp =
this.Server.GetLastError() as HttpUnhandledException;
// eApp represents the raised and not caught exception.
Exception eApp = eHttp.InnerException;
Response.Write( "Error : " + eApp.Message );
Response.End(); // <- Don't forget this call!!!
}
</script>