Assembly="SimpleControlSamplesVB"
改成如下试试:
Assembly="denghan"

解决方案 »

  1.   

    SimpleControlSamplesVB是什么? 自己写的控件?
    你没有SimpleControlSamplesVB.dll
      

  2.   

    <%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="SimpleControlSamplesVB" %>=========><%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="denghan" %>
      

  3.   

    加入SimpleControlSamplesVB.dll
      

  4.   


    <%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="SimpleControlSamplesVB" %>改成<%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="denghan" %>
      

  5.   

    把SimpleControlSamplesVB.dll加入到项目中,
    并设置项目依赖性即可
      

  6.   

    <%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="denghan" %>
    -------努力学习 不断实践 虚心讨教--------
      

  7.   

    it works fine here, no need to change anything, just make sure SimpleControlSamplesVB.dll is the in bin subdirectory of your web page
      

  8.   

    <%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="SimpleControlSamplesVB" %>
    <html>
       <body>
          <form method="POST" action="Simple.aspx" runat=server>
              <SimpleControlSamples:SimpleControlSamplesVB id="MyControl" runat=server/>
      

  9.   

    如果不想改程序,那么把denghan.dll改成SimpleControlSamplesVB.dll吧
      

  10.   

    你将用户控件文件拖到一个WebForm1.aspx,再用运行。
    我这里也不能用浏览预览用户控件
      

  11.   

    谢谢楼上各位的指导!
    改为<%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="denghan" %>后,这行不出错了,但新错又来了:
    分析器错误信息: 未能从程序集 denghan, Version=1.0.1385.17725, Culture=neutral, PublicKeyToken=null 中加载类型 SimpleControlSamples.SamplesVB。源错误: 
    行 3:   <body>
    行 4:   <form method="POST" action="test1.aspx" runat="server" ID="Form1">
    行 5:   <SimpleControlSamples:SamplesVB  id="MyControl" runat="server" />
    行 6:   </form>
    行 7:   </body>
     
    源文件:.../denghan/test1.aspx 行5  .这几天感冒+头痛,脑子不好使,请高手再帮看看,谢谢了
      

  12.   

    把denghan.dll改名为SimpleControlSamples.dll后,上述错误没有了,但又出个“配置”错误:
    分析器错误信息: 找到的名为“SimpleControlSamples”的程序集清单定义与程序集引用不匹配。源错误: 
    行 170:                <add assembly="System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    行 171:                <add assembly="System.EnterpriseServices, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    行 172:                <add assembly="*"/>
    行 173:            </assemblies>
    行 174:
     源文件: c:\windows\microsoft.net\framework\v1.0.3705\Config\machine.config    行: 172 
      

  13.   

    改为<%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="denghan" %>后,这行不出错了,但新错又来了:
    分析器错误信息: 未能从程序集 denghan, Version=1.0.1385.17725, Culture=neutral, PublicKeyToken=null 中加载类型 SimpleControlSamples.。
    因为你的类名是: SimpleVB  而不是SamplesVB!
      

  14.   

    注意两点就行了:
    1、<%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="denghan" %>中的 Assembly的值必须是你的控件所在的dll文件名,去掉后缀,比如你的控件编译后叫 myControl.dll,那么上面的Assembly的值就必须是 myControl ;
    2、<SimpleControlSamples:SamplesVB  id="MyControl" runat="server" />
    中的SimpleControlSamples是你用上面的代码注册控件时的 TagPrefix 值,冒号后的SamplesVB 必须是你的控件的类名。