我正在创建一个 DNN 模块,并且有一个基于此的工作模块:http://www.subodh.com/Projects/DNN-Module .
当我在 DNN 5.6.2 安装上安装它时,一切正常,除了 .ascx 文件没有复制过来。如果我手动复制 .ascx 文件,该模块可以正常工作。
我的 .dnn 文件如下所示:
...
<moduleDefinitions>
<moduleDefinition>
<friendlyName>SignUp.Control1</friendlyName>
<defaultCacheTime>0</defaultCacheTime>
<moduleControls>
<moduleControl>
<controlKey />
<controlSrc>Control1.ascx/Control1.ascx</controlSrc>
<supportsPartialRendering>True</supportsPartialRendering>
<controlTitle>Control1</controlTitle>
<controlType>View</controlType>
<iconFile />
<helpUrl />
<viewOrder>0</viewOrder>
</moduleControl>
...
</moduleControls>
</moduleDefinition>
</moduleDefinitions>
...
具体来说,Control1.ascx 不会被复制到 DesktopModules/SignUp 目录。
我没有收到错误。这是 DNN 在安装模块时所说的相关部分。我在安装时没有遇到任何错误。
...
Info Component installed successfully - Script
Info Starting Installation - Module
Info Module registered successfully - SignUp
Info Component installed successfully - Module
Info Starting Installation - Assembly
...
谁能告诉我为什么控件没有复制到适当的目录?
谢谢。
最佳答案
看来你的<controlSrc>
有误标签,也许你的意思是:<controlSrc>DesktopModules/SignUp.Control1/Control1.ascx</controlSrc>
您还需要在 <component type="File">
中提及此文件:
<component type="File">
<files>
<file>
<path>Your Desire Path</path>
<name>Control1.ascx</name>
</file>
</files>
</component>
关于module - DNN模块包没有安装控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13196622/