H
haiwen
Hello, everyone.
I am in trouble to create an error page for my application.
in Web.config file:
<customErrors defaultRedirect="errorPage.aspx"
mode="On" />
in one .aspx
private void Page_Load(object sender, System.EventArgs e)
{
throw(new Exception("try!!!"));
}
But when the error occur, my application can not
redirected to errorPage.aspx that my customized error page.
Even I try other ways, such as in <%@Page
ErrorPage="errorPage.aspx" ... %>
or
private void Page_Error(object sender, System.EventArgs e)
{
Response.Redirect("errorPage.aspx");
}
But I still can not redirect to the errorPage.aspx when
error occur.
Could anyone help? I do appreciate your help!!!
Best Wishes,
haiwen
I am in trouble to create an error page for my application.
in Web.config file:
<customErrors defaultRedirect="errorPage.aspx"
mode="On" />
in one .aspx
private void Page_Load(object sender, System.EventArgs e)
{
throw(new Exception("try!!!"));
}
But when the error occur, my application can not
redirected to errorPage.aspx that my customized error page.
Even I try other ways, such as in <%@Page
ErrorPage="errorPage.aspx" ... %>
or
private void Page_Error(object sender, System.EventArgs e)
{
Response.Redirect("errorPage.aspx");
}
But I still can not redirect to the errorPage.aspx when
error occur.
Could anyone help? I do appreciate your help!!!
Best Wishes,
haiwen