P
poifull
Hi all,
I specified an aspx page in my web.config/customErrors tag to handle any
error that might occur.
When an exception is thrown, Server.GetLastError() returns null in the error
handling page. Please let me know if my approach is wrong.
Web.config:
<customErrors defaultRedirect="ShowErrorMessage.aspx" mode="On" />
ShowErrorMessage.aspx:
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Server.GetLastError() == null); // prints True
}
Thanks in advance.
I specified an aspx page in my web.config/customErrors tag to handle any
error that might occur.
When an exception is thrown, Server.GetLastError() returns null in the error
handling page. Please let me know if my approach is wrong.
Web.config:
<customErrors defaultRedirect="ShowErrorMessage.aspx" mode="On" />
ShowErrorMessage.aspx:
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Server.GetLastError() == null); // prints True
}
Thanks in advance.