日期:2014-05-20  浏览次数:20505 次

csdn的错误页
<%@   Page   Language= "C# "   EnableViewState= "false "   %>

<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN "   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

        <script   type= "text/javascript ">
        <!--
        var   duration=2900;
        var   endTime   =   new   Date().getTime()   +   duration   +   100;
        function   interval()
        {
                var   n=(endTime-new   Date().getTime())/1000;
                if(n <0)   return;
                document.getElementById( "timeout ").innerHTML   =   n.toFixed(3);
                setTimeout(interval,   10);
        }
        window.onload=function()
        {
                setTimeout( "window.location.href= 'http://community.csdn.net/index.htm ' ",   duration);
                interval();
        }
        //-->
        </script>
<html   xmlns= "http://www.w3.org/1999/xhtml ">
<head   runat= "server ">
        <title> 发生错误 </title>
</head>
<body>
        <form   id= "form1 "   runat= "server ">
                <div>
                        对不起!你所访问的页面出错! <br   />
                        系统在   <span   id= "timeout "> 3.000 </span>   秒后   将自动跳转到   <a   href= "http://community.csdn.net/index.htm "> 社区首页 </a>
                </div>
        </form>
</body>
</html>



------解决方案--------------------
没有C#代码,楼上说的应该是第一行那个指令代码,这个页面应该不是一个aspx页面,或者是aspx页面但没有安装asp.net或没有配置正确,因为第一行的指令代码也没有经过asp.net引擎的解析,其它地方都是客户端脚本和普通html,并没有C#代码。