呈现控件时出错-b(发生了处理的异常。未将对象引用设置到对象的实例)这个是什么回事啊?急求答案!谢谢

解决方案 »

  1.   

    一、对象所在的命名空间没有引用二、对象没有实例化三、出现异常。实例化失败对象为 null
      

  2.   

    你找找是不是在cs文件中使用了某个控件,但是aspx文件中没有
      

  3.   

    <%@ Control Language="C#" ClassName="Foot" %><script runat="server">    protected void Page_Load(object sender, EventArgs e)
        {
            ltlFoot.Text = PageSettings.Get().PageFoot;
        }
    </script>
    <asp:Literal runat="server" ID="ltlFoot" />
    <br /><div style="text-align:center"><spaces:PageTime runat="server" ID="b" /></div><script type="text/javascript">
    var file = '/Statistics.aspx'; 
    var account='www';
    var cReferrer,cPage;
    window.onerror=null;
    var cHeight, cWidth, cBitDepth, cResolution;
    cHeight = screen.height;
    cWidth = screen.width;
    cBitDepth = screen.colorDepth;
    if (cBitDepth == null)
    {
    cBitDepth = screen.pixelDepth;
    }
    cResolution = cWidth + "x" + cHeight;
    cReferrer = escape(document.referrer)+"";
    cPage = escape(document.location.href)+""   ;//.replace(/^([^\:]+):\/\/([^\/]+)(.*)$/ig, "$3");
    document.write ("<img src='" + file + "?page=" + cPage + "&account="+ account +"&res=" + cResolution + "&col=" + cBitDepth + "&ref=" + cReferrer + "' border='0' height='0' width='0'>");
    </script>这是右击编辑控件里的代码