1.新建Golbal.asax
2.前台部分:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>ErrorPage</title>
<script language="javascript" type="text/javascript">
function CheckError_onclick() {
var chk = document.getElementById("CheckError");
var divError = document.getElementById("errorMsg");
if(chk.checked)
{
divError.style.display = "inline";
}
else
{
divError.style.display = "none";
}}
</script>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align: center">
<asp:Label ID="Label1" runat="server" Text=" 面出 了" Style="text-align: center"></asp:Label><br/>
<input type="checkbox" id="CheckError" onclick="CheckError_onclick()" />查看 信息<br/><br/>
</div>
<div id="errorMsg" style="text-align: center; display:none" runat="server">
<asp:Label ID="ErrorMessageLabel" runat="server" Text=""></asp:Label><br />
</div>
</form>
</body>
</html>
3.后台把错误信息显示:
新闻热点
疑难解答