自定义控件部署到母版页查询 [英] Custom control deployment to master page query
问题描述
我已经创建了一个自定义控制器,并设法使用Visual Studio中的本地化部署方法部署到我的母版页并按预期工作,但我尝试通过.wsp文件而不是.dll方法进行部署。所以现在它已经为Sharepoint部署了
并且已经全局激活。
我添加了对web.config文件的引用;
$
< SafeControl Assembly =" customcontrolcanonical,Version = 1.0.0.0 ,Culture = neutral,PublicKeyToken = 98fba23c6fac0b64"命名空间= QUOT; CanonicalControl"类型名= QUOT * QUOT;安全= QUOT;真" SafeAgainstScript = QUOT;真" />
在主文件中注册;
<%@ Register TagPrefix =" HWL"名称空间= QUOT; CanonicalControl" Assembly =" customcontrolcanonical,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = 98fba23c6fac0b64" %>
在主文件中调用它;
< HWL:CanonicalControl runat =" server" id =" CanonicalOverride">< / HWL:CanonicalControl>
但是我收到了错误;
分析程序错误消息: 未知服务器标签'HWL:CanonicalControl'。
任何人都可以放弃任何光吗?
非常感谢!
尝试将dll打包为'GlobalAssemblyCache',如下面的线程所示。
最好的问候,
利跨度>
I have created a custom controller and have managed to deploy to my master page using the localised deploy method from Visual Studio and working as intended however I am trying to deploy via .wsp file rather than the .dll method. So now it's currently deployed
to Sharepoint and have activated globally.
I have added the reference to the web.config file;
<SafeControl Assembly="customcontrolcanonical, Version=1.0.0.0, Culture=neutral, PublicKeyToken=98fba23c6fac0b64" Namespace="CanonicalControl" TypeName="*" Safe="True" SafeAgainstScript="True" />
Register in master file;
<%@ Register TagPrefix="HWL" NameSpace="CanonicalControl" Assembly="customcontrolcanonical, Version=1.0.0.0, Culture=neutral, PublicKeyToken=98fba23c6fac0b64" %>
Calling it within the master file;
<HWL:CanonicalControl runat="server" id="CanonicalOverride"></HWL:CanonicalControl>
But I get the error;
Parser Error Message: Unknown server tag 'HWL:CanonicalControl'.
Can anyone shed any light please?
Many thanks!
Hi,
Try to package the dll as ‘GlobalAssemblyCache’ as below thread.
Best Regards,
Lee
这篇关于自定义控件部署到母版页查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!