1

我创建了一个服务器控件(自定义控件)。我想在我的 sharepoint 项目中使用它。我刚刚通过右键单击工具箱并添加项目将该自定义控件 dll 添加到工具箱中。现在,我只需拖放到可视 Webpart 表面。编译时出现以下错误。

The type or namespace name 'SearchCustomControl' does not exist in the namespace 'SearchCustomControl' (are you missing an assembly reference?)'

web.config 文件或任何地方有什么要改变的吗?

如果我使用像下面这样注册控件

<%@ Register TagPrefix="ncc" Namespace="SearchCustomControl" Assembly="SearchCustomControl" %>

没有编译错误。部署到共享点站点后,它给了我错误。 在此处输入图像描述

如何使用我们想在 Visual Studio 2010 的另一个共享点项目中引用的自定义控件 dll?

4

0 回答 0