.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="error.aspx.cs" Inherits="Job.Web.error" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML><HEAD><TITLE>510兼职网提醒您:您访问的页面不存在 请转到首页进入</TITLE>
<META http-equiv=Content-Type content="text/html; charset=GB2312">
<META http-equiv=refresh content="5;URL = http://www.510jz.com">
<STYLE type=text/css></STYLE>
<liNK type=text/css rel=stylesheet>
<STYLE type=text/css>BODY {
FONT-SIZE: 9pt; COLOR: #842b00; liNE-HEIGHT: 16pt; FONT-FAMILY: "Tahoma", "宋体"; TEXT-DECORATION: none
}
TABLE {
FONT-SIZE: 9pt; COLOR: #842b00; liNE-HEIGHT: 16pt; FONT-FAMILY: "Tahoma", "宋体"; TEXT-DECORATION: none
}
TD {
FONT-SIZE: 9pt; COLOR: #842b00; liNE-HEIGHT: 16pt; FONT-FAMILY: "Tahoma", "宋体"; TEXT-DECORATION: none
}
BODY {
SCROLLBAR-HIGHliGHT-COLOR: buttonface; SCROLLBAR-SHADOW-COLOR: buttonface; SCROLLBAR-3DliGHT-COLOR: buttonhighlight; SCROLLBAR-TRACK-COLOR: #eeeeee; BACKGROUND-COLOR: #ffffff
}
A {
FONT-SIZE: 9pt; COLOR: #842b00; liNE-HEIGHT: 16pt; FONT-FAMILY: "Tahoma", "宋体"; TEXT-DECORATION: none
}
A:hover {
FONT-SIZE: 9pt; COLOR: #0188d2; liNE-HEIGHT: 16pt; FONT-FAMILY: "Tahoma", "宋体"; TEXT-DECORATION: underline
}
H1 {
FONT-SIZE: 9pt; FONT-FAMILY: "Tahoma", "宋体"
}
</STYLE>
<META content="MSHTML 6.00.2800.1458" name=GENERATOR></HEAD>
<BODY topMargin=20>
<form id="form1" runat="server">
<TABLE cellSpacing=0 width=600 align=center border=0 cepadding="0">
<TBODY>
<TR colspan="2">
<TD vAlign=top align=middle><IMG height=100 src="Images/404.jpg"
width=100 border=0>
<TD>
<TD><!--------System Return Begin------------>
<H1>无法找到该页</H1>
HTTP 错误 :<asp:Literal ID="Literal1" runat="server"></asp:Literal>.
<HR noShade SIZE=0>
<P>☉ 请尝试以下操作:</P>
<ul>
<li>确保浏览器的地址栏中显示的网站地址的拼写和格式正确无误。
<li>如果通过单击链接而到达了该网页,请与网站管理员联系,通知他们该链接的格式不正确。
<li>单击<A href="javascript:history.back(1)"><FONT
color="#ff0000">后退</FONT></A>按钮尝试另一个链接。 </li></ul>
<P>☉ <a href="http://www.510jz.com">www.510jz.com</a> 510兼职网:
<ul>
<li><A href="http://www.510jz.com"
target=_blank>http://www.510jz.com</A></li>
</ul>
<HR noShade SIZE=0>
<P>☉ 如果您对本站有任何疑问、意见、建议、咨询,请联系管理员QQ:729994997</A>
<BR>
<BR>
</P><!------------End this!---------------></TD></TR></TBODY></TABLE>
</form>
</BODY>
</HTML>
.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Job.Web
{
public partial class error : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.Literal1.Text = Request.QueryString["msg"].ToString();
}
}
}
web.config
<customErrors mode="On" defaultRedirect="error.aspx">
<error statusCode="302" redirect="error.aspx?msg=请求的资源暂时驻留在另一不同的统一资源标识符下。"></error>
<error statusCode="400" redirect="error.aspx?msg=您的输入可能有误,链接地址有错误。"></error>
<error statusCode="401" redirect="error.aspx?msg=权限不能被认可,请退出系统重新尝试。"></error>
<error statusCode="403" redirect="error.aspx?msg=您的输入可能有误,不具备可执行的权限。"></error>
<error statusCode="404" redirect="error.aspx?msg=链接地址不正确,请尝试重新链接。"></error>
<error statusCode="408" redirect="error.aspx?msg=服务器连接超时,请退出系统重新尝试。"></error>
<error statusCode="414" redirect="error.aspx?msg=您的输入可能有误,参数传递超出范围。"></error>
<error statusCode="500" redirect="error.aspx?msg=服务器错误,请检查数据库操作字符串。"></error>
<error statusCode="503" redirect="error.aspx?msg=服务器忙或网络连接异常,请退出系统重新尝试。"></error>
<error statusCode="505" redirect="error.aspx?msg=浏览器不支持,请升级您的浏览器。"></error>
</customErrors>