dim e as exception = server.GetLastError()
though I dont think this will catch errors such as 404 which would usually
be caught by IIS. Good for catching exceptions in your app though... HTH jd
"ad" wrote:
I have a customErrors section in Web.config.
All error except error 403 and 404, will be redirect to
GenericErrorPage.aspx.
How can I show the e.Message or some explicit statement according the error
type in GenericErrorPage.aspx?
----------------------------------------------------------------------------
----------------------------------------------------
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.aspx">
<error statusCode="403" redirect="NoAccess.aspx"/>
<error statusCode="404" redirect="FileNotFound.aspx"/>
</customErrors>