62,046
社区成员
发帖
与我相关
我的任务
分享
/// <summary>
/// 自定义404页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Application_Error(object sender, EventArgs e)
{
Exception ex = Server.GetLastError();
if (ex is HttpException && ((HttpException)ex).GetHttpCode() == 404)
{
//如何指向绝对路径的URL?
Response.Redirect("Mall/MyPage404");
}
}