我写一个www.vb如下:
Imports System.Web.UI
Namespace aqiao.text
    Public Class helloworld
      Inherits Control        Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
            writer.Write("hello,world")
        End Sub    End Class
End Namespace用命令 vbc /t:library www.vb /r:System.Web.dll /r:System.dll编译成www.dll
然后添加到项目的bin里面
写一个2.aspx如下:<%@ Page Language="vb"%>
<%@Register TagPrefix="aqiao" Namespace="aqiao.text" Assembly="www"%>
<HTML>
<HEAD>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>
<body>
<aqiao:helloworld id="hello" runat="server"/>
</body>
</HTML>结果很正常,访问2.aspx出现hello world我想问的是,在visual basic.net里面可以编译这个vb文件吗?我找不到这样的方法,于是建立一个项目,项目只放这个vb文件,编译项目,生成WebControlLibrary1.dll
我将这个WebControlLibrary1.dll放到web项目的bin里面,将aspx文件里的改为:
<%@Register TagPrefix="aqiao" Namespace="aqiao.text" Assembly="WebControlLibrary1"%>
这时候访问2.aspx就出错了:未能从程序集 WebControlLibrary1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 中加载类型 aqiao.text.helloworld。请问,如何用visual basic.net编译vb文件,让自定义控件可以使用?