void
Application_Error(
object
sender, EventArgs e)
{
Exception ex = Server.GetLastError();
if (ex is HttpException)
{
if (((HttpException)(ex)).GetHttpCode() == 404)
Server.Transfer( "~/Error404.aspx" );
}
// Code that runs when an unhandled error occurs
Server.Transfer( "~/DefaultError.aspx" );
}
{
Exception ex = Server.GetLastError();
if (ex is HttpException)
{
if (((HttpException)(ex)).GetHttpCode() == 404)
Server.Transfer( "~/Error404.aspx" );
}
// Code that runs when an unhandled error occurs
Server.Transfer( "~/DefaultError.aspx" );
}