已经存在的文件列表:
web.config
menu.ascx
index.aspx
index.aspx.cs
index.aspx.designer.cs
abc.dll (在bin和App_Data目录下都有)
描述:
我这里有一个之前的 abc.dll 文件,新建了一个project(asp.net C#代码)的 myweb,并把原来的html一部分代码拷贝了过来(到:index.aspx)。
页面里面用了一个自定义控件 menu.ascx (已拷贝到项目下面了,并添加进入项目了), 在 “index.aspx.designer.cs”文件里面看到自动添加了如下内容:
protected global::English_menu mu1;
自定义控件 menu.ascx 中有如下描述:
<%@ control language="C#" autoeventwireup="true" inherits="English_menu, abc" %>
我把 abc.dll 放到 bin 目录和 App_Data 目录中,然后在web.config里面加入了
<add assembly="*"/>
可调试的时候报错 “The type or namespace name 'English_menu' could not be found in the global namespace (are you missing an assembly reference?)”
msdn,和网上查了半天关键字,可能是由于关键词选的不对,看到各种Import,Assembly,DllImport方法。。。试了好久还是不知道具体应该怎么添加引用这个Dll里面的命名空间。。。
等待高人指点~~~
myQQ: 1850018