Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CS0433: The type 'ASP.WebUserControl' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\7794bb4e\26287caf\App_Web_top.ascx.cdcab7d2.8hbtcwhw.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\7794bb4e\26287caf\App_Web_top2.ascx.cdcab7d2.fyio9xef.dll'Source Error:
Line 84:       
Line 85:         <div style="background-color: White; width: 100%;clear:both;">
Line 86:             <uc1:Top ID="Top" runat="server" folder="../" />  
Line 87:             <div id="con_left1" style="padding-left: 1px;float:left">
Line 88:                 <div class="sidebox" style="height:600px; margin-top:15px;">
Source File: e:\z$df#web\zuzhijigou\jiuye\News\NewsRead_new 1.aspx    Line: 86
Show Detailed Compiler Output:Show Complete Compilation Source:

解决方案 »

  1.   

    ASP.WebUserControl存在于两个dll中,你还是指明具体的命名空间吧
      

  2.   

    Line 86: <uc1:Top ID="Top" runat="server" folder="../" /> 
    报错这一行,同样在其他页面都好使,就他报错,我不太明白你什么意思,谢谢指导
      

  3.   

    不行清一下Temporary ASP.NET Files目录吧。
      

  4.   

    <%@ Page Language="C#" %><%@ Register Src="~/Bottom.ascx" TagName="Bottom" TagPrefix="uc2" %>
    <%@ Register Src="~/Top.ascx" TagName="Top" TagPrefix="uc1" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">    public News news = null;
        public string newsImg;
        protected void Page_Load(object sender, EventArgs e)
        {
            int newsId = 0;
            if (int.TryParse(Request.QueryString["id"], out newsId))
            {
                news = new News(newsId, true);
            }
            else
            {
                Session.Add("ErrMessage", "新闻读取失败,连接串发生错误!");
                Response.Redirect("../Error.aspx");
            }
            this.Title = ConfigurationManager.AppSettings["webSiteName"] + "-" + news.Title;
            //if (!(StudentInfo.CheckLogin() || Admin.CheckLogin() || CompanyInfo.CheckLogin()))
            //{
            //    Response.Redirect("../Login.aspx?url=" + Request.RawUrl);
            //}
            switch (news.ClassID)
            {
                case 24: newsImg = "<img src=../images/ggl.gif  />"; break;
                case 3: newsImg = "<img src=../images/zfyrdw.gif  />"; break;
                case 21: newsImg = "<img src=../images/jyzc.gif  />"; break;
                case 22: newsImg = "<img src=../images/jyzd.gif  />"; break;
                case 23: newsImg = "<img src=../images/jyzx.gif  />"; break;
                case 48: newsImg = "<img src=../images/mxjcjy.gif  />"; break;
            }
        }
        
    </script><html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <link href="../Styles/Top.css" rel="stylesheet" type="text/css" />
        <link href="../Styles/News.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <form id="form1" runat="server">
            <div style="background-color: White; width: 100%;">
                <uc1:Top ID="Top1" runat="server" folder="../" />
                <div id="con_right2" style="width: 95%; padding: 0px; clear: both; float: none;">
                    <div id="art_title" style="width:95%; margin-top:35px; margin-left:0px;">
                        <%=news.Title%>
                    </div>
                    <div id="art_content" style="padding-left: 15px; padding-right: 15px;">
                        <div style="text-align: center;">
                            (发布时间:<%=news.Time.ToString()%>)</div>
                        <%=Utility.UnFilterStr(news.Content)%>
                    </div>
                    <div id="Div1" style="text-align: right; font-size: 12px;">
                        <%="(来源:" + news.From + ")【浏览次数:"+ (news.Hit+1).ToString() + "次】"%>
                    </div>
                    <div id="Div2">
                    </div>
                    <div id="Div3">
                    </div>
                </div>
                <uc2:Bottom ID="Bottom1" runat="server" bfolder="../" />
            </div>
        </form>
    </body>
    </html>
      

  5.   

    以上是我的源码,麻烦高人指点一下。在这个页面Top控件老报错,打不开网页,但在其他页面这个Top控件都好使
      

  6.   

    以上是我的源码,这个Top控件报错,页面打不开,Top。ascx本身应该没问题,其他几个页面用这个Top控件都好使,高手们给看一下,谢谢啦。