ASP.NET在web层的web.config下进行如下配置:
当web层中的页面报错时,会自动跳转到根目录下的error.htm页面,提示用户,非常人性化。
<system.web>
<customErrors mode="On" defaultRedirect="~/error.htm"></customErrors>
</system.web>
ASP.NET在web层的web.config下进行如下配置:
当web层中的页面报错时,会自动跳转到根目录下的error.htm页面,提示用户,非常人性化。
<system.web>
<customErrors mode="On" defaultRedirect="~/error.htm"></customErrors>
</system.web>
下面列了五个例子来详细说明,这几个例子的主要功能是:在5秒后,自动跳转到同目录下的hello.html(根据自己需要自行修改)文件。1) html的实现<head><!-- 以下方式只是刷新不跳转到其他页面 --><meta http-equiv="refresh" content="10"><!-- 以下方式定时转到其他页面 --&g
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M