在WebCustomControl1.cs定义了WebCustomControl1
然后在web页引用
<%@ Register TagPrefix="Custom" Namespace="test" Assembly = "WebCustomControl1" %>
找不到文件或程序集名称“WebCustomControl1”,或找不到它的一个依赖项。

解决方案 »

  1.   

    http://chs.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx
      

  2.   

    编译这后,把DLL放到bin目录,又有新问题在页面
    在页面写上<Custom:WebCustomControl1 id=w1 runat=server/>
    出现错误
     CS1595: 已在多处定义“test.WebCustomControl1”;使用“c:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\test\1aeb13a2\70ec1340\assembly\dl2\43e18bc9\00eab407_0f60c501\WebCustomControl1.DLL”中的定义
      

  3.   

    是自已有CSC编译还是开发环境自动编译啊
    能不能说一下步骤
      

  4.   

    不知道是不是我设置错了
    我的VS2003根本就不会自动编译WebCustomControl1.cs文件
      

  5.   

    完全的代码在此,无论如何都不行
    using System;
    using System.Web;
    using System.Web.UI;
    namespace SimpleControlSamples {
        public class Simple : Control {
           protected override void Render(HtmlTextWriter output) {
               output.Write("<H2>欢迎使用控件开发!</H2>");
           }
        }    
    }
    web页
    <%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="SimpleControlSamples" %>
    <html>
       <body>
          <form method="POST" action="Simple.aspx" runat=server>
              <SimpleControlSamples:Simple id="MyControl" runat=server/>
          </form>
       </body>
    </html>
    但就是不行
      

  6.   

    删除bin下面的所有东西,重新编译
      

  7.   

    不用VS.NET开发,用记事本的话反而没有问题
      

  8.   

    csc /t:library SimpleControlSamples.csthen move the SimpleControlSamples.dll to the bin directory of your application directory