Few day back i need error code like 404 in Application_Error event handler.
I tried and finally got it.
Dim httpErrorCode As Integer
Dim Last Error As HttpException
LastError = HttpContext.Current.Server.GetLastError()
httpErrorCode = LastError.GetHttpCode()
That gives us http error code that would have been sent to the browser if I had not intercepted the error.
Cheers!..
Mahesh
maheshsingh21@hotmail.com
ASP.NET Interview Questions |
C# Interview Questions |
.NET Interview Questions |
Dot Net Interview Questions |
VB.NET Interview Questions |
Oracle Interview Questions